>>> argList = ["egg1", "egg2"]
>>> egg2(*argList)
egg1
egg2
You can use *args (arguments) and **kwargs (for keyword arguments) when calling a function.
Have a look at this blog on how to use it properly.
More Related Contents:
- How do I initialize a dictionary of empty lists in Python?
- How to return dictionary keys as a list in Python?
- How to convert list to string [duplicate]
- if else in a list comprehension [duplicate]
- How would you make a comma-separated string from a list of strings?
- Basics of recursion in Python
- Python -Intersection of multiple lists?
- Python: Removing list element while iterating over list [duplicate]
- In Python, when to use a Dictionary, List or Set?
- Check if something is (not) in a list in Python
- How to find the last occurrence of an item in a Python list
- Convert a list with strings all to lowercase or uppercase
- What is the inverse function of zip in python? [duplicate]
- django – convert a list back to a queryset [duplicate]
- How to convert a string of space- and comma- separated numbers into a list of int? [duplicate]
- Initializing 2D array in Python
- How to remove multiple indexes from a list at the same time? [duplicate]
- How to multiply all integers inside list [duplicate]
- Check if element exists in tuple of tuples
- Finding clusters of numbers in a list
- Convert a number to a list of integers [duplicate]
- Unexpected Behavior of Extend with a list in Python [duplicate]
- If in Python I put a list inside a tuple, can I safely change the contents of that list? [duplicate]
- How to find the maximum number in a list using a loop?
- Given a list of elements in lexicographical order (i.e. [‘a’, ‘b’, ‘c’, ‘d’]), find the nth permutation – Average time to solve?
- Join a list of strings in python and wrap each string in quotation marks
- Find non-common elements in lists
- Skip elements on a condition based in a list comprehension in python
- count occurrence of a list in a list of lists
- Automatically growing lists in Python