python3 get current user name code example Example: python get username import os username = os.getlogin()