how to get the user name of the computer in python code example Example: python get username import os username = os.getlogin()