basically what I am asking is imagine you made a game in Python and after you once play it and finished it, we ask the user if they would like to continue? if they choose 'yes', is there a way to clear the screen and restart the game from the beginning? (without having the code execution(game) of the previous play of the user)
Just a Small Example - def add(num1,num2): return num1 + num2
def enter_number():
num1 = int(input("Enter First Number: "))
num2 = int(input("Enter Second Number: "))
print(add(num1,num2))
enter_number()
would_continue = input("Would you like to Continue? 'y' or 'n'")
if would_continue == 'y':
#Way to Clear Screen?
enter_number()
else:
print("Goodbye, user :D")