Want to learn a cool trick to assign multiple variables on a single line? #Python #yasirbhutta
Channel | Publish Date | Thumbnail & View Count | Download Video |
---|---|---|---|
Publish Date not found | 0 Views |
Want to learn a cool trick to assign multiple variables on a single line?
**[Coded]**
**[Coded]**
“`python
a, b, c = 1, 2, 3
print(a)
print(b)
print(c)
“`
We assigned values to “a”, “b” and “c” on a single line. Now when we print them…/"
**[To go out]**
“`
1
2
3
“`
/"You can do the same thing with strings and other data types!/"
**[Coded]**
“`python
name, age, city = /"Ali/
Please take the opportunity to connect and share this video with your friends and family if you find it useful.