Too many values problem

Posted by DraskyVanderhoff on Stack Overflow See other posts from Stack Overflow or by DraskyVanderhoff
Published on 2010-06-12T15:19:50Z Indexed on 2010/06/12 15:22 UTC
Read the original article Hit count: 330

Filed under:

Hi , i was trying to make a full lot of ips for testing using this code :

ip_is = [i for i in range(256)]
ports = [i for i in range(1024,49152)]
return [str(i1)+"."+str(i2)+"."+str(i3)+"."+str(i4)+":"+str(p) for i1,i2,i3,i4,port in ip_is,ip_is,ip_is,ip_is,ports]

The problem is the 3rd line in which is made the ip list. If there is a way to make it all at once or how can make one at time in a lazy way ? I'm pretty noob at python :P.

Thanks for the Help :)

© Stack Overflow or respective owner

Related posts about python