Skip to content

Instantly share code, notes, and snippets.

@anselmobd
Last active April 20, 2023 14:23
Show Gist options
  • Save anselmobd/b8832b889683d8626d4f4713cb770d9f to your computer and use it in GitHub Desktop.
Save anselmobd/b8832b889683d8626d4f4713cb770d9f to your computer and use it in GitHub Desktop.
Console clear screen
#!/usr/bin/env python3
import shutil
def clearscr():
terminal_size=shutil.get_terminal_size()
print("\n"*(terminal_size.lines-2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment