The documentation for eval may give you clues as to what it needs https://docs.python.org/3/library/functions.html#eval
Also, you should use an exception handling block within the loop to detect eof to break from the loop
Well, recall how Python has the eval function which will do a lot of work for you if you are going for the shortest approach.
To keep getting input, just put everything in an infinite loop. When will it terminate? Just search for an EOF in the input