[Tutor] Building Starships -- object of type 'int' has no len()

Marc Tompkins marc.tompkins at gmail.com
Mon Aug 18 06:49:46 CEST 2014


On Sun, Aug 17, 2014 at 9:40 PM, Terry--gmail <terry.kemmerer at gmail.com> wrote:
> I found another place in Thunderbirdy to set 'plain text'.
>
> This is a test.
>
> Does the below code look correct now?
>
> --And did I reply correctly this time?  (Reply-All and keep only
> tutor at python.org address...)
>
>
> for line_number, row in enumerate(catalog2):
>
> for col, item in enumerate(row):
>
> if lens[col] < len(item):
>
> lens[col] = len(item)

1)  It's plain text - no more funky font changes.
2)  Addressing is good.
3)  Indentation is still flat.

Ah well.  As Meat Loaf sang, two out of three ain't bad...


More information about the Tutor mailing list