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

Alan Gauld alan.gauld at btinternet.com
Wed Aug 20 02:09:23 CEST 2014


On 19/08/14 23:41, Terry--gmail wrote:

> Alan Guald:
>
>
> for row in catalog2:
>      print(row)
>      for col, item in row:
>          lens[col].append(len(item))

My bad, it should have been

for col, item in enumerate(row):

Sorry,

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list