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