I am trying to learn about *
in python and encountered this problem, when I do:
print(*["John", 20])
I get following output:
John 20
I want to use it here and I know that this works:
print("My name is {0}, I am {1} lat".format(*["John", 20]))
But I don't understand how this works, as an argument of format I need: format("John", 20)
, not format("John" 20)
. Why in print statement I do not see this comma?