You can use list comprehension:
>>> list_of_tuples = [(1, 2), (4, 5)]
>>> list_of_lists = [list(elem) for elem in list_of_tuples]
>>> list_of_lists
[[1, 2], [4, 5]]
More Related Contents:
- How to make Selenium not wait till full page load, which has a slow script?
- Match a whole word in a string using dynamic regex
- Fixed digits after decimal with f-strings
- Print multiple arguments in Python
- What does it mean to “call” a function in Python? [closed]
- Why does Python print unicode characters when the default encoding is ASCII?
- Python progression path – From apprentice to guru
- Is it pythonic to import inside functions?
- Unable to get local issuer certificate when using requests in python
- NumPy 1.21.2 may not yet support Python 3.10
- How do I update a Python package?
- How should I choose between using instance vs. class attributes?
- How do I set browser width and height in Selenium WebDriver?
- cx_Freeze converted GUI-app (tkinter) crashes after pressing plot button
- Python pandas: remove everything after a delimiter in a string
- How can I do a batch insert into an Oracle database using Python?
- Efficient way to partially read large numpy file?
- Windows can’t find the file on subprocess.call()
- How do I bundle a Python application including dependencies into a Windows Installer package for distribution?
- How can I create a list of elements from an iterator (convert the iterator to a list)?
- NameError: name ‘raw_input’ is not defined [duplicate]
- How can I interleave or create unique permutations of two strings (without recursion)
- Principal component analysis in Python
- Why does subprocess.Popen() with shell=True work differently on Linux vs Windows?
- int object is not iterable while trying to sum the digits of a number? [duplicate]
- What are the differences between bool() and operator.truth()?
- dataframe to long format
- Installing lxml, libxml2, libxslt on Windows 8.1
- How to drop all columns with null values in a PySpark DataFrame?
- Get max value from row of a dataframe in python [duplicate]