How can I end a while while True cycle using a line break? I have this little function:
def number_add():
print("3[1;33m"+"Please enter two numbers: \n" + "3[;36m"+ "Operator 1: ", end='')
a = input()
print("3[;36m"+"Operator 2: ",end='')
b = input()
print("3[4;35m"+"Result: %s + %s = %s" %(a, b, str(int(a) + int(b))))
while True:
if input() == '\n':
break
clear()
When I try to end it with the enter key it does not work, it only makes a line break in the console, what is the error?