list_a = [3, 9, 17, 15, 19]list_b = [2, 4, 8, 10, 30, 40, 50, 60, 70, 80, 90]for a, b in zip(list_a, list_b): if a>b: print a else: print b
zip
will create pairs of elements when passed two lists, and will stop at the end of the shorter list.
zip
can handle three or more lists as well!
w=word.lower()
string.lower() method to make your string lower case