In this Python list program, we will take a list of tuples as input and convert tuples in list into a sublist with the help of the below-given steps.
Convert tuples in list to sublist:
Steps to solve the program
- Take a list containing tuples as input.
- Using for loop convert tuples in list to sublist.
- If the iterated element has type tuple then use nested for lopp to iterate over elements in the tuple.
- Add the elements to the empty list using the append() function
- And add those lists as sublists to another list.
- Print the list to see the result.
Output :
Related Articles
Python program to create a dictionary from a sublist in a given list.
Python program to replace ‘Java’ with ‘Python’ from the given list.
Python program to convert the 3rd character of each word to a capital case from the given list.
Python program to remove the 2nd character of each word from a given list.
Python program to get a length of each word and add it as a dictionary from the given list.
Python program to remove duplicate dictionaries from the given list.