adambard / adambard/learnxinyminutes-docs
unpacking list in python
Open
- Dominant language
- Markdown
- Stars
- 12.3k
- Forks
- 3.7k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 6
Description
## we can unpack the list in python
``` python:
a = [1,2,3,4,5]
a,*b,c = a
print(a)
print(b)
print(c)
```
answer: ```a = 1, b = 2,3,4 ,c = 5 ```
not only unpack tuples we can unpack **lists**.
Contributor guide
Assessment
This issue has not been assessed yet.