os.environ is a dictionary
We can directly operate on this dictionary to affect the environment variables of the current system runtime.
import them os.environ['qikang'] = 'leslie' for k,v in os.environ.items(): print (k, v)
os.environ is a dictionary
We can directly operate on this dictionary to affect the environment variables of the current system runtime.
import them os.environ['qikang'] = 'leslie' for k,v in os.environ.items(): print (k, v)