micropython

Annotated tests/tuple.py

634:c1c95a183e21
2013-01-14 Paul Boddie Moved common logic into a separate method.
paul@110 1
#!/usr/bin/env python
paul@110 2
paul@254 3
a1 = 1, 2, 3
paul@254 4
a2 = (1, 2, 3)
paul@254 5
b1 = 1, (2, 3), 4, 5
paul@254 6
paul@254 7
result_1 = a1[0]
paul@254 8
result_2 = a2[1]
paul@254 9
result_3 = b1[1][1]
paul@254 10
result_4 = b1[2]
paul@254 11
resultL_2 = len(b1[1])
paul@254 12
resultL_3 = len(a1)
paul@254 13
resultL_4 = len(b1)
paul@110 14
paul@110 15
# vim: tabstop=4 expandtab shiftwidth=4