[Tutor] how to convert array into tuple
Eric Brunson
brunson at brunson.com
Wed Sep 26 20:40:43 CEST 2007
Fangwen Lu wrote:
> Dear all-
>
> If I have an array array([1, 2, 3, 4, 5, 6]), and I want to get
> ((1,2),(3,4),(5,6)). What should I do?
First, you read some documentation and tutorials on the language, then
you iterate over the list and build tuples out of the elements.
>
> Thank you!
>
> Fangwen
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list