Computer Science, asked by anup5138, 1 year ago

How to clear screen using python?

Answers

Answered by vibhabeast2004
0

Answer:

From os import system.

Define a function.

Make a system call with 'clear' in Linux and 'cls' in Windows as an argument.

Store the returned value in an underscore or whatever variable you want (an underscore is used because python shell always stores its last output in an underscore).

Call the function we defined.

Similar questions