H
hokieghal99
Hi,
I'm trying to do this:
------------------------------
a="192."
b="168."
c="1."
r = range(256)
for r in r:
print a + b + c + r
------------------------------
But, I get this error: cannot concatenate 'str' and 'int' objects. So, I
need to convert the ints in the range to strs, but I do not know how to
do that. Could someone help me? Ultimately, I want to print out
something like this to a text file:
192.168.1.0
192.168.1.1
192.168.1.2
....
192.168.1.255
Thanks!!!!
I'm trying to do this:
------------------------------
a="192."
b="168."
c="1."
r = range(256)
for r in r:
print a + b + c + r
------------------------------
But, I get this error: cannot concatenate 'str' and 'int' objects. So, I
need to convert the ints in the range to strs, but I do not know how to
do that. Could someone help me? Ultimately, I want to print out
something like this to a text file:
192.168.1.0
192.168.1.1
192.168.1.2
....
192.168.1.255
Thanks!!!!