Write Python code to remove all strings from a list of tuples
Topic: Write Python code to remove all strings from a list of tuples
Solution
listOfTuples = [('string', 'Geeks'), (2, 225), (3, '111'), (4, 'Cyware'), (5, 'Noida')] output = [tuple(j for j in i if not isinstance(j, str)) for i in listOfTuples] print(output)
List all Python Programs