Fun with Python

python code to shutdown the system.

import os
os.system(“shutdown /s /t 0”)

please share if you know any python code which makes fun

import os 
os.system('cls')

get the output

1 Like

It’s really interesting @gajendravenkatbsc. I think this will help to clear the screen. please try to write the functionality of the code. Thanks for sharing.

in case you need a functionaliy you can print sys time repeective to clear screen

import os
from datetime import datetime
def clear_screen():
    os.system('cls' if os.name == 'nt' else 'clear')
while True:
    clear_screen()
    current_time = datetime.now().strftime("%H:%M:%S")
    print("Current Time:", current_time)
    
1 Like

interesting. keep active