Iterating Through Environment Items : Environment « Development « Python





Iterating Through Environment Items

import os 

for k, v in os.environ.items(): 
    print "%s=%s" % (k, v) 

print "\n".join(["%s=%s" % (k, v) for k, v in os.environ.items()])   

           
       

Related examples in the same category

1.Return the current working directory