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