I am printing environment variables, but there are not printed in a sorted way :
for variable in os.environ:
print(" " + variable + "=" + os.environ.get(variable))
I would like to sort os.environ. I tried to put os.environ in a list(), but the sort function is not working.
Any clue?
Thank you
1 Answer