import os current_users = os.getlogin() print(current_users)
Here is what the above code is Doing:
1. Importing the os module.
2. Creating a variable called current_users and setting it equal to the result of os.getlogin().
3. Printing the value of current_users.