[Tutor] Please code review.

Karim kliateni at gmail.com
Tue Aug 2 14:53:38 CEST 2011


Thanks Martin,

This is the generator expression version.
I can use both function generator or generator expression version 
correction.

Cheers
Karim

On 08/02/2011 02:47 PM, Martin Gracik wrote:
> def get_cellnames2(rows, cols):
>     rows = range(1, rows + 1)
>     cols = string.ascii_uppercase[:cols]
>     return ('%s%s' % (col, row) for row in rows for col in cols)



More information about the Tutor mailing list