Is It Possible To Append The Elements Of Tuple Into List Using Python?
Here is the List,
list = ["Red", "Blue", "Green"]
and Tuple
tuple = ("Silver","Yellow","Gray")
Here is the List,
list = ["Red", "Blue", "Green"]
and Tuple
tuple = ("Silver","Yellow","Gray")
Yes, It is possible.
Using the extend() method in Python, You can append elements of tuples into list
E.g.,
list = ["Red", "Blue", "Green"]
tuple = ("Silver", "Yellow", "Gray")
list.extend(tuple)
print(list)
Output:
['Red', 'Blue', 'Green', 'Silver', 'Yellow', 'Gray']