Expand|Select|Wrap|Line Numbers
- for i in range(65,70):
- for j in range(65,70):
- for k in range(65,70):
- print chr(i),chr(j),chr(k)
aaaaa
aaaaA
aaaAa
aaAaa
ans so on through every combination. I now have this portion which seems closer but still not quite there:
Expand|Select|Wrap|Line Numbers
- from string import letters
- #my 'lowers' list has extra chars at the end so I have to trim it
- lowers = letters[26:52]
- uppers = letters[:26]
- for lower in lowers:
- for upper in uppers:
- print lower,upper
a B
a C
a D
So my question is how can I get this to run through with 5 values and through every combination, without doing something like this:
Expand|Select|Wrap|Line Numbers
- for lower in lowers:
- for upper in uppers:
- print lower,lower,lower,lower,upper
- print lower,lower,lower,upper,lower