does python could support sequence of short or int?

Diez B. Roggisch deets at nospam.web.de
Thu Mar 30 03:21:40 EST 2006


momobear schrieb:
> hi, is there a way to let python operate on sequence of int or short?
> In C, we just need declare a point, then I could get the point value,
> just like:
> short* k = buffer, //k is a point to a sequence point of short.
> short i = *k++,
> but python is a dynamic language,
> a = buffer
> i = ? I don't know how to continue, what's a? a seems to be a str?

You should read the python tutorial, especially the parts about list, 
tuples and dicts.

http://docs.python.org/tut/

Diez



More information about the Python-list mailing list