Derailed_Dash

Clearing Console

Dec 27th, 2022 (edited)
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def print_and_clear(msg: str, delay=0.05):
  2.     print(msg)
  3.     time.sleep(delay)
  4.     cls()
  5.  
  6. def cls():
  7.     """ Clear console """
  8.     os.system('cls' if os.name=='nt' else 'clear')
Advertisement
Add Comment
Please, Sign In to add comment