Arbitrary Arguments (*args)

Share

When in doubt about number of arguments,  add * before the argument.

def world_cup(*teams):
print(“The World Cup teams are “ + teams[2])

world_cup(“India”, “South Africa”, “Australia”)

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *