function = input('Enter function')
a = input('do you want to enter another function')
b = [function]
if a.lower() == 'yes':
while True:
function1 = input('Next Function')
b += function1
if function1 == 'quit':
break
print(b)
在这段代码中,如果我在 function1 中输入:y = 9x + 1; 它会将值放入数组中,但格式为:'y', ' ', '9x', ' ', '+', ' ', '1'
. 如何将输入另存为y = 9x + 1'?
当我写退出时,它会打印数组,但最终值为q','u','i','t'
. 我如何消除这些价值观?