I have a Python list (mixed with string and values) like below:
mylist = [('Needie', 83, 55, 78, None), ('Blue', 80, 60, None, 66), ('Bloodnok', None, 54, 57, 59), (None,)]
The desired output should be:
newlist = [('Needie', 83, 55, 78, None), ('Blue', 80, 60, None, 66), ('Bloodnok', None, 54, 57, 59)]
What should I do to remove the last tuple (None,) in the list? Keep other tuples as before, includes names (string), None value and floats
del list[:-1]
Output:
[(None,)]