How can I find out if there is even, or odd, number of elements in an arbitrary list.
I tried list.index() to get all of the indices... but I still don\'t k
list.index()
All you need is
len(listName)
Which will give you the length.
I guess you could also do this then
if len(listName) % 2 == 0: return True # the number is even! else: return False # the number is odd!