How can I iterate over only the first variable of a tuple
Posted
by Peter Smit
on Stack Overflow
See other posts from Stack Overflow
or by Peter Smit
Published on 2010-06-17T11:47:52Z
Indexed on
2010/06/17
11:53 UTC
Read the original article
Hit count: 341
In python, when you have a list of tuples, you can iterate over them. For example when you have 3d points then:
for x,y,z in points:
pass
# do something with x y or z
What if you only want to use the first variable, or the first and the third. Is there any skipping symbol in python?
© Stack Overflow or respective owner