Python Forum
What does * mean in the below line?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does * mean in the below line?
#1
Print([*range(0, 20, 2)])
Reply
#2
https://docs.python.org/3/tutorial/contr...ment-lists
Reply
#3
So basically * unpacks the element in a list?
Reply
#4
Yes, it does.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020