Peter Otten __peter__ at
Mon Oct 3 00:31:44 CEST 2005

g.franzkowiak wrote:

> tmpList = list(dataObject)[:4])
> obj     = tmpList[0]+tmpList[1]+tmpList[2]+tmpList[3].

Have you tried just

obj = dataObject[:4]

without the intermediate list? If that failed, can you tell us the type of
the dataObject? E. g.

>>> print type(dataObject)
<class '__main__.NeitherListNorString'>


More information about the Python-list mailing list