Skip to content

Instantly share code, notes, and snippets.

@menon92
Created January 23, 2018 08:05
Show Gist options
  • Save menon92/e5b343ce52d9f2e05e20ed56f8bcb27f to your computer and use it in GitHub Desktop.
Save menon92/e5b343ce52d9f2e05e20ed56f8bcb27f to your computer and use it in GitHub Desktop.
def variable_lenghts_argument_function(normal_argument, *argv):
print("Normal argument is: ", normal_argument)
for argument in argv:
print("Argument pass by *argv is: ", argument)
variable_lenghts_argument_function("Language", "Python", "Java", "C/C++")
Output:
Normal argument is: Language
Argument pass by *argv is: Python
Argument pass by *argv is: Java
Argument pass by *argv is: C/C++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment