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()
your_list = [1,2,3,(4,5)] # modulo operation finds the remainder of division of one number by another. if len(your_list) % 2 == 0: print "Even Number" else: print"number is odd"