Tuple unpacking: dummy variable vs index
Posted
by peter
on Stack Overflow
See other posts from Stack Overflow
or by peter
Published on 2010-04-06T05:24:56Z
Indexed on
2010/04/06
5:33 UTC
Read the original article
Hit count: 332
What is the usual/clearest way to write this in Python?
value, _ = func_returning_a_tuple()
or:
value = func_returning_a_tuple()[0]
© Stack Overflow or respective owner