StackOverflow Questions for Tag: iterable-unpacking

barrios
barrios

Reputation: 1124

Python 2 tuple / list unpacking using star throws SyntaxError

Score: 2

Views: 2833

Answers: 1

Read More
user2385591
user2385591

Reputation: 121

Invalid syntax python starred expressions

Score: 12

Views: 11866

Answers: 3

Read More
gboffi
gboffi

Reputation: 25013

SyntaxError with starred expression when unpacking a tuple on its own for string formatting

Score: 54

Views: 68866

Answers: 3

Read More
Sachin Dobhal
Sachin Dobhal

Reputation: 21

List unpacking in python

Score: 1

Views: 57

Answers: 1

Read More
Rusty Rob
Rusty Rob

Reputation: 17173

python: when can I unpack a generator?

Score: 13

Views: 21353

Answers: 3

Read More
Zags
Zags

Reputation: 41160

Why does Python tuple unpacking work on sets?

Score: 0

Views: 175

Answers: 3

Read More
Cai
Cai

Reputation: 2120

Type hints when unpacking a tuple?

Score: 153

Views: 35207

Answers: 2

Read More
Azamat
Azamat

Reputation: 249

How to fix ValueError: too many values to unpack (expected 3) in Python?

Score: 1

Views: 12287

Answers: 5

Read More
PlasmaBinturong
PlasmaBinturong

Reputation: 2274

Unpacking the last arguments with star spread operator in Groovy closure

Score: 0

Views: 30

Answers: 1

Read More
Paul Jurczak
Paul Jurczak

Reputation: 8127

Python f-string equivalent of iterable unpacking by print instruction

Score: 0

Views: 136

Answers: 3

Read More
Aliza Hashmi
Aliza Hashmi

Reputation: 1

Unpacking Tuples into two tuples

Score: 0

Views: 62

Answers: 3

Read More
psihodelia
psihodelia

Reputation: 30492

What do ** (double star/asterisk) and * (star/asterisk) mean in a function call?

Score: 815

Views: 289436

Answers: 5

Read More
Pyderman
Pyderman

Reputation: 16189

Getting only element from a single-element list in Python?

Score: 129

Views: 137808

Answers: 3

Read More
Dennis Jacob
Dennis Jacob

Reputation: 11

I am trying to use tuple unpacking for a custom iterable. The iterable size should be increase as the number of variables in the lhs

Score: -1

Views: 40

Answers: 2

Read More
Thomas Arildsen
Thomas Arildsen

Reputation: 1290

Why can I unpack a Python set when sets are unordered?

Score: 2

Views: 99

Answers: 4

Read More
Jack
Jack

Reputation: 1

Why is the SWAP instruction missing in Python 3.11's disassembled bytecode for tuple swaps?

Score: 0

Views: 38

Answers: 0

Read More
praveen
praveen

Reputation: 3253

How does swapping of members in tuples (a,b)=(b,a) work internally?

Score: 42

Views: 23898

Answers: 1

Read More
McKay
McKay

Reputation: 12604

Why are parentheses required for assignment of a tuple to an annotated variable?

Score: 4

Views: 4957

Answers: 1

Read More
Intrastellar Explorer
Intrastellar Explorer

Reputation: 2381

How to type hint args and kwargs, if not unpacking, in most general form?

Score: 2

Views: 617

Answers: 1

Read More
user13079354
user13079354

Reputation: 273

What is the correct way to unpack a tuple composed of a TreeNode and an Integer?

Score: -1

Views: 92

Answers: 3

Read More
PreviousPage 1Next