how to get user's name in python code example Example: python get username import os username = os.getlogin()