Clear Window function? My imagination or a reality?


#1

I'm working on improving the battleship game, and its really annoying how the battleship game keeps making a new board for each new move. I would rather have a new move REPLACE the old battleship output, with the new move. So I'm wondering if there is some sort of clear function? I searched online, and I found a bunch of ways, all of which didn't work. Is it because codecademy just replicates the workings of Python, and doesn't have all the capabilities of Python, and that I need to actually download Python (sorry for the rough syntax of my speaking about Python)? And if yes, where, and how?

Please address every single one of my questions. I have noticed that a lot of the people who answer my questions never address all my questions (and sometimes they don't even answer any of my questions!!!!). If you don't know the answer to some of the questions, SAY SO, so that someone else can answer the rest, and that they don't perceive your comment as the answer to ALL my questions, when in reality you just answered a fes


#2

Codecademy uses Python 2.7.3.

I clear, if needed with:

clear = lambda: "\n" * 200

print clear()

#3

uuuhhh, that function doesn't work, all it did was shift the next output 200 lines down in the window... :hushed: :hushed: :open_mouth:
are you sure that you meant to type it as you did, or was that what you meant to do? cuz thats not clearing...


#4

Yes, I consider taking it off the screen clearing it away.

There is no "official" clear function pre-made into Python 2.

I'm not 100% sure on Python 3+ though.


#5

I admit it works, but I was hoping there was something cleaner.