how to get user name in windows 10 python code example Example: python get username windows username = os.getlogin()