convert ints in a range to strings

hokiegal99 hokiegal99 at hotmail.com
Wed Sep 17 19:52:40 EDT 2003


Thank you (Paul & Duncan) for showing me how to do this!

Paul Rubin wrote:
> hokieghal99 <hokiegal99 at hotmail.com> writes:
> 
>>------------------------------
>>a="192."
>>b="168."
>>c="1."
>>r = range(256)
>>for r in r:
>>	print a + b + c + r
> 
> 
> for r in range(256):
>   print "192.168.1.%d" % r






More information about the Python-list mailing list