TypeError: unsubscriptable object

Diez B. Roggisch deets at nospam.web.de
Sun Jun 11 10:47:26 EDT 2006


k.retheesh at gmail.com schrieb:
> Can anybody tell me why am I getting this error message while trying to
> print a part of a string. Is there a better approach for this...

Because you don't use a string? The error message is pretty clear:

TypeError: unsubscriptable object

So - what are Function[:10], Description[:10] ? You _assume_ they are 
strings, seems not to be the case.

Diez



More information about the Python-list mailing list