# Write a function, called sumEven, # that takes a list of strings as its argument. # Each string may be either letter or an integer. # A sum of all even integers. If there is no even integers, return 0 # # You may use isdigit() which # returns true if there is at least one character in a given string # and all characters in the string are digits, false otherwise. # # A sample run would be # # print(sumEven(['12', 'A', '8', 'e', '5'])) # 20 # # print(sumEven([A, 1, e, 5, 3, 1111, cs])) # 0 # # You may assume the list is non-empty, no tie, non negative integers # but you may not make any other assumptions about the list. def sumEven(lst): result = 0 for i in lst: if (i.isdigit()) and (int(i) % 2 == 0): result += int(i) return result print(sumEven(['12', 'A', '8', 'e', '5'])) print(sumEven(['A', '1', 'e', '5', '3', 'cs']))