how to know pc username python installed code example Example: python get username windows username = os.getlogin()