[Tutor] Using for loops for combinations

Danny Yoo dyoo at hashcollision.org
Tue Feb 18 20:18:48 CET 2014


On Tue, Feb 18, 2014 at 8:37 AM, Chinanu 'Chinex' Onyekachi
<chinex at live.com> wrote:
> Find all possible combinations of a specific word (string) using any
> combination of upper case and lower case letters with a for loop (no
> itertools).
>
>
> An example:
>
> string_input = hat
>
> comboination = ['hat', 'Hat', 'HAt', 'HAT', 'hAT', 'haT', 'HaT', 'hAt']

[code cut]


This appears to be homework, so unfortunately the help that can be
provided will need to be limited; otherwise there's a risk of
violating your institution's Honor Code.

Can you talk more about what difficulty are you running into?


More information about the Tutor mailing list