Python Module os: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
print(os.environ.get('HOME')) | print(os.environ.get('HOME')) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
If the environment variable does not exist, the call will get <code>None</code> |
Revision as of 23:15, 20 January 2022
External
Internal
Overview
Environment Variables
import os
print(os.environ.get('HOME'))
If the environment variable does not exist, the call will get None