Re: python 3 prefix to infix without too many parethesis

2019-12-09 Thread DL Neil via Python-list
On 10/12/19 8:40 AM, Terry Reedy wrote: On 12/9/2019 6:21 AM, jezka...@gmail.com wrote: Hi, I have got a problem. Is this homework? Same question - that way we know that our task is to help you learn to code in Python, cf a problem with Python itself... Similarly, you may like to know th

Re: python 3 prefix to infix without too many parethesis

2019-12-09 Thread Terry Reedy
On 12/9/2019 6:21 AM, jezka...@gmail.com wrote: Hi, I have got a problem. Is this homework? I wrote a code for prefix to infix. It works, but I need improve it so on input there will be only necessary parentheses. Define 'necessary'; give multiple input/output examples. Put them in a test f

python 3 prefix to infix without too many parethesis

2019-12-09 Thread jezkator
Hi, I have got a problem. I wrote a code for prefix to infix. It works, but I need improve it so on input there will be only necessary parentheses. Can u help me? Here is the code: import re a = input() class Calculator: def __init__ (self): self.stack = [] def push (self, p):