Say you want to make a list of every possible 4-letter combination out of 4 sets of 11 characters each

Say you want to make a list of every possible 4-letter combination out of 4 sets of 11 characters each.
I thought this might be possible in excel by merging and expanding tables but it seems like it can't handle merging more than 2 columns.

Python has "itertools.combinations(iterable, r)" which looks like it'd be perfect, but I've never used iterables in python and am not sure how to turn my sets of letters into the iterator needed for the input.

Am I barking up the wrong tree? Is there an easy way to do this?

Attached: image.jpg (1600x1057, 575K)

Other urls found in this thread:

docs.python.org/2/library/itertools.html#itertools.combinations
stackoverflow.com/questions/9884132/what-exactly-are-iterator-iterable-and-iteration
twitter.com/AnonBabble

It's only 11^4 minus duplicates

Attached: Pen-and-Paper-700x736.jpg (700x736, 73K)

This is n choose k. Look it up. In c++ you can use permutations/combinations. There's very likely something like that in python

>This is n choose k.
(not true, by the way)

list(itertools.product('abcd', 'efgh', 'ijkl', 'mnop'))

I may be wrong but why couldn't you do this with string comparison, loops, and 5-8 arrays pending how many values you want to keep after comparison and array assignment?

Attached: 1516392868385.gif (400x472, 1.92M)

muh straws

>Say you want to make a list of every possible 4-letter combination
ok
>out of 4 sets of 11 characters each
you've lost me. please provide an example.

Wtf? Why don't they just get a big net and haul that shit to a landfill?

who are 'they'?

So like
(1: asdfghjklmnb, 2: poiuytrewql, 3: zxcvbnmlkjh, 4: qwertyghjklp)
I need every possible 4-character permutation that uses one letter from 1, one from 2, etc.

OP just do it with a bunch of for loops if you dont understand iterables, though the function you referenced is exactly just a bunch of for loops done for you...
docs.python.org/2/library/itertools.html#itertools.combinations
did you even google the function you're trying to use?
docs.python.org/2/library/itertools.html#itertools.combinations
I get that you're new but christ, you'd already be done by now if you just googled it

If it's for a combination lock they're super easy to crack.

meant to link
stackoverflow.com/questions/9884132/what-exactly-are-iterator-iterable-and-iteration

use quad for loops

Initialize 4 chars = 0
Each uchar is an index into each of the 4 lists of chars. While char4

most helpful thing here, thank you

Attached: image.jpg (750x1123, 128K)

him skiny

buddh needs meat

Np

I mean, if you're looking for "easiest" I'd just do it the quick and dirty way with bash.

$ echo {a,b,c,d}{a,b,c,d}{a,b,c,d}{a,b,c,d} | fold
aaaa aaab aaac aaad aaba aabb aabc aabd aaca aacb aacc aacd aada aadb aadc aadd
abaa abab abac abad abba abbb abbc abbd abca abcb abcc abcd abda abdb abdc abdd
acaa acab acac acad acba acbb acbc acbd acca accb accc accd acda acdb acdc acdd
adaa adab adac adad adba adbb adbc adbd adca adcb adcc adcd adda addb addc addd
baaa baab baac baad baba babb babc babd baca bacb bacc bacd bada badb badc badd
bbaa bbab bbac bbad bbba bbbb bbbc bbbd bbca bbcb bbcc bbcd bbda bbdb bbdc bbdd
bcaa bcab bcac bcad bcba bcbb bcbc bcbd bcca bccb bccc bccd bcda bcdb bcdc bcdd
bdaa bdab bdac bdad bdba bdbb bdbc bdbd bdca bdcb bdcc bdcd bdda bddb bddc bddd
caaa caab caac caad caba cabb cabc cabd caca cacb cacc cacd cada cadb cadc cadd
cbaa cbab cbac cbad cbba cbbb cbbc cbbd cbca cbcb cbcc cbcd cbda cbdb cbdc cbdd
ccaa ccab ccac ccad ccba ccbb ccbc ccbd ccca cccb cccc cccd ccda ccdb ccdc ccdd
cdaa cdab cdac cdad cdba cdbb cdbc cdbd cdca cdcb cdcc cdcd cdda cddb cddc cddd
daaa daab daac daad daba dabb dabc dabd daca dacb dacc dacd dada dadb dadc dadd
dbaa dbab dbac dbad dbba dbbb dbbc dbbd dbca dbcb dbcc dbcd dbda dbdb dbdc dbdd
dcaa dcab dcac dcad dcba dcbb dcbc dcbd dcca dccb dccc dccd dcda dcdb dcdc dcdd
ddaa ddab ddac ddad ddba ddbb ddbc ddbd ddca ddcb ddcc ddcd ddda dddb dddc dddd

Don't just give a solution, you should have added in small logic mistakes like how i did to give room for learning to happen

I just want to spread the good news that is bash brace expansion.

Attached: image.jpg (370x350, 95K)