How do I get the username in Python? [duplicate] September 17, 2023 by Tarik import getpass print getpass.getuser()