python get pc user name to variable code example Example: python get username import os username = os.getlogin()