I have this starred expression but it gives error SyntaxError: can't use starred expression here
so any alternative solutions would be appreciated.
JavaScript
x
7
1
def checker(packages):
2
for pac in packages:
3
print(*pac)
4
a,b,c=*pac
5
return a,b,c
6
print(checker([[4,3,7],[9,6,1]]))
7
Advertisement
Answer
Just remove the *
:
JavaScript
1
2
1
a, b, c = pac
2
This is enough for python to unpack right hand side of the assignment.