Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Little help here
#6
(11-25-2009, 03:09 PM)Fallen Wrote: To generate a list of all alphanumeric characters you could do this;
Code:
>>> Characters = [ chr( Char ) for Char in range( 65, 90+1 ) + range( 97, 122+1 ) + range(48, 57+1) ]
>>> print Characters
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']

Not exactly what you asked for but it may be helpful
Interesting,I might make something from it.

(11-25-2009, 03:46 PM)nevets04 Wrote:
Code:
def a(a,b,c):
    d = '%s,'%[a,b,c],'%s,'%[a,c,b],'%s,'%[b,a,c],'%s,'%[b,c,a],'%s,'%[c,b,a],'%s,'%[c,a,b]
    print "".join(d)

??

Yeah, that's for 3 chars, and a hard way. Imagine how many lines of code would it take for 4 or 5 chars.
I'd also like to have a functionality, that would, out of a given charset (let's say lowercase alpha) print all possible combinations of creitan length.

Looks like it's a thought script, I already spent over a week thinking of it.Wacko
Reply


Messages In This Thread
Little help here - by L0iz - 11-25-2009, 12:02 PM
RE: Little help here - by bsdpunk - 11-25-2009, 12:08 PM
RE: Little help here - by L0iz - 11-25-2009, 12:15 PM
RE: Little help here - by Fallen - 11-25-2009, 03:09 PM
RE: Little help here - by nevets04 - 11-25-2009, 03:46 PM
RE: Little help here - by L0iz - 11-26-2009, 01:17 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)