Write a Python function to remove empty tuples from a list of tuples function to remove empty tuples using filter
Topic: Write a Python function to remove empty tuples from a list of tuples function to remove empty tuples using filter
Solution
def Remove(tuples): tuples = filter(None, tuples) return tuples tuples = [(), ('ram','15','8'), (), ('laxman', 'sita'), ('krishna', 'akbar', '45'), ('',''),()] print(Remove(tuples))
List all Python Programs