filmov
tv
Python Tuple To List | How to Convert Tuple To List | FREE Python Course

Показать описание
In this lesson, we will focus on how to convert Python Tuple to List. Here, we use list () method.
Let's do an example for this purpose:
cars = ("bmw", "audi", "volvo", "mercedes")
a = list(cars)
print(a)
Normally, cars is a python tuple. But with this code and with python function method, we convert python tuple to the python list. The output of this python code will be:
['bmw', 'audi', 'volvo', 'mercedes']
For more examples, visit:
.
.
#pythontupletolist #pythontuples #pythonlists #python3 #freepythoncourse #pythonprogramming
Let's do an example for this purpose:
cars = ("bmw", "audi", "volvo", "mercedes")
a = list(cars)
print(a)
Normally, cars is a python tuple. But with this code and with python function method, we convert python tuple to the python list. The output of this python code will be:
['bmw', 'audi', 'volvo', 'mercedes']
For more examples, visit:
.
.
#pythontupletolist #pythontuples #pythonlists #python3 #freepythoncourse #pythonprogramming