choice_0 = 'y'
choice_1 = 'n'
direction = ""
user_input = ""
menu_input = ""
action = "You woke up in the woods."
Po "poprawieniu" błędu, który opisał wyżej @PanPrezes, pojawił mi się kolejny, jak niżej:
Ten zapis nie działa w Windows10 x64 Python 3.8.3
def screen_clear():
_ = call('clear' if os.name =='posix' else 'cls')
Zwraca taki bład:
ten działa:
def screen_clear():
os.system('cls' if os.name=='nt' else 'clear')
lub
def screen_clear():
_ = lambda: subprocess.call('cls||clear', shell=True)
mój ulubiony
# działa windows, linux, i nie tylko w python'ie :-)
screen_clear = lambda: print("\033[H\033[2J")