Log in Profile in python
Question: Is there any way that we can print the user name of the person who has logged
in the system in the file? the file is an output file of python.


Answer: You could look into `os.environ`.

    
    
    In [1]: import os
    
    In [2]: os.environ['LOGNAME']
    Out[2]: 'lev'
    

