.
Код: Выделить всё
userInputX="" #userInputX is always replaced before
#running again, so it can be set once here
while True:
print("----------------------------------------------------------")
if not myqueue.isEmpty(): # Display both postfix and infix
print("Postfix: "+str(myqueue))
print("Infix: "+StackCalc.postfix2infix(myqueue))
prompt=input(">")
if prompt == "exp" or prompt == "^": prompt = "**" #
Подробнее здесь: [url]https://stackoverflow.com/questions/78795104/plotting-a-function-that-is-a-string-in-matplotlib-interpreting-a-str-as-pyth[/url]