Aug-03-2019, 10:49 AM
start
will be a str
, so you can do something likeuse
map
>>> start = '192.168.1.99' >>> start = list(map(int, start.split('.'))) # you need to convert the map object to list >>> start [192, 168, 1, 99]or use list comprehension
>>> start = '192.168.1.99' >>> start = [int(num) for num in start.split('.')] >>> start [192, 168, 1, 99]
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs