pythondebugging

How can I fix this without any external libraries?


import os
whoami = os.system("whoami")
print("something here" + whoami + "something here")

I want to print the output of whoami, but it returns an error.


Solution

  • import os
    
    
    print(f"something here {os.getlogin()} something here")