📅  最后修改于: 2022-03-11 14:45:12.603000             🧑  作者: Mango
import os
print(os.environ['HOME'])
# using get will return `None` if a key is not present rather than raise a `KeyError`
print(os.environ.get('KEY_THAT_MIGHT_EXIST'))