This is my test code, test.py:
str = input("IP: ")
print(str)
When running I get this error:
➜ PingScript git:(master) ✗ python test.py
IP: 1.1.1.1
Traceback (most recent call last):
File "test.py", line 1, in <module>
str = input("IP: ")
File "<string>", line 1
1.1.1.1
^
SyntaxError: invalid syntax
This happens only if I use 1.1.1.1 as input and not if I use 1.1 as input, what is happening here? I've tried to parse it with str(str) but I still get the same error.
str. What do you expectstr(str)to do?