[Tutor] Building Starships -- object of type 'int' has no len()
Marc Tompkins
marc.tompkins at gmail.com
Mon Aug 18 10:00:25 CEST 2014
On Mon, Aug 18, 2014 at 12:13 AM, Cameron Simpson <cs at zip.com.au> wrote:
> On 17Aug2014 23:51, Terry--gmail <terry.kemmerer at gmail.com> wrote:
>>
>> I'm copy and pasting from Ninja-IDE, which I thought was created
>> specifically to do python programming...so I never checked to see if it
>> needs to have the tab set to enter 4 spaces, as it appeared visually to be
>> doing that. But, I don't remember whether I used their tab or manually
>> typed 4 spaces. SO, I have typed the lines below in manually:
>>
>> for line_number, row in enumerate(catalog2):
>> for col, item in enumerate(row):
>> if lens[col] < len(item):
>> lens[col] = len(item)
>>
>> How's that?
>
>
> All good except for the last line, which would normally be indented further
> than the "if".
Poop. I missed that.
Also, looking at the Ninja-IDE website more closely I see that,
although they do mention compatibility with multiple languages, they
were designed by and for Python programmers - which makes the
tab/space issue less likely. I dunno.
More information about the Tutor
mailing list