How exactly did you get the final product if you don't know how to get 
there? I'm sorry but what you are trying to do does not seem fair:)
One hint: for loops

PS generators are actually specific functions in Python: 
http://stackoverflow.com/questions/1756096/understanding-generators-in-python#1756156

However, considering your goal (just one call), you don't need one.

Kaur

18.10.2016 00:44 pedrorenato1...@gmail.com kirjutas:
> Hello guys. so my assignment consists in creating a key generator so i can 
> use it in later steps of my work. In my first step i have to write a function 
> called key_generator that receives an argument, letters, that consists in a 
> tuple of 25 caracters. The function returns a tuple of 5 tuples of caracters, 
> each tuple with 5 elements.
>  Sounds confusing right? well I have the final product but i dont know how to 
> get there. I was told by my professor that I dont really have to use any 
> complicated knowledge of python so I have to keep it simple. Can u help me 
> plz? just give me a hint how to do it and i'll do everything plz.
>
> example:
> Python Shell
>
>>>> letters = (‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, \
> ... ‘H’, ‘I’, ‘J’, ‘ ’, ‘L’, ‘M’, ‘N’, \
> ... ‘O’, ‘P’, ‘Q’, ‘R’, ‘S’, ‘T’, ‘U’, \
> ... ‘V’, ‘X’, ‘Z’, ‘.’)
>>>> key_generator(letters)
> ... ((‘A’, ‘B’, ‘C’, ‘D’, ‘E’),
> ... (‘F’, ‘G’, ‘H’, ‘I’, ‘J’),
> ... (‘ ’, ‘L’, ‘M’, ‘N’, ‘O’),
> ... (‘P’, ‘Q’, ‘R’, ‘S’, ‘T’),
> ... (‘U’, ‘V’, ‘X’, ‘Z’, ‘.’))
>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to