Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
os.getlogin() python 1

os.getlogin() python

June 11, 2022 by Anurag batra
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.

Categories Python Examples
Post navigation
how to redirect in flask to the same page
how to do randon in python
© MyEduKit - 2022 . All Rights Reserved.