-2

hello guys I did not understand why we put * here y

def print_people( # here # *people # here #):
for person in people:
    print("hello" + person)

print_people("blabla" , "love" , "blabla")

kepler
  • 11
  • 1
  • 1
    Does this answer your question? [What does \*\* (double star/asterisk) and \* (star/asterisk) do for parameters?](https://stackoverflow.com/questions/36901/what-does-double-star-asterisk-and-star-asterisk-do-for-parameters) – Abdul Niyas P M Feb 05 '20 at 10:21

1 Answers1

0

* In Python used to unpack data from iterables.

Example:

arr = [1,2,3,4,5] 

*arr will unpack the array as 1 2 3 4 5
Anonymous
  • 335
  • 1
  • 2
  • 17