how do i clear the screen in python?

0 votes
is it similar to c++ where we can use clrscr.

or do we have to mention some other command to clear the screen?
Mar 19 in Python by Waseem
• 2,590 points
21 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
import os
os.system('cls')

or

os.system('clear')
answered Mar 19 by Mohammad
• 1,400 points

Related Questions In Python

0 votes
1 answer

In NumPy how do I get the maximum of subsets? Python

You can use np.maximum.reduceat: >>> _, idx = np.unique(g, ...READ MORE

answered Nov 9, 2018 in Python by Nymeria
• 3,500 points
38 views
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Clear Screen in Python

pip3 install clear-screen and then: from clear_screen import clear ...READ MORE

answered Jan 28 in Python by Zong
72 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
54 views
0 votes
1 answer

how do I check the length of an array in a python program?

lets say we have a list mylist = ...READ MORE

answered Mar 12 in Python by Mohammad
• 1,400 points
16 views
0 votes
1 answer

how do i check for exceptions in python?

use self.assertRaises method as a context manager. def ...READ MORE

answered Mar 12 in Python by Mohammad
• 1,400 points
34 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.