Write a program to remove empty tuples from a list of tuples


Topic: Write a program to remove empty tuples from a list of tuples

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