I want to receive input where there is a newline in Python.
I want to input a number and I have implemented the following code, but I get the following error
Code
string = []
while True:
    input_str = int(input(">"))
    if input_str == '':
        break
    else:
        string.append(input_str)
Error
ValueError: invalid literal for int() with base 10: ''
line error
>1
>2
>3
>
Traceback (most recent call last):
  File "2750.py", line 4, in <module>
    input_str = int(input(">"))
ValueError: invalid literal for int() with base 10: ''
 
     
    