# 1. Given a list x, what is the index of the last item in the list # 2. True/False: Both of the following for loops # would generate the same number of loop iterations: # # for num in range(2): # do something # # for num in range(1, 2): # do something # 3. Write a function that takes a string # and returns the sum of all integers in the string. # Return 0 if there is no integer in the string. # Note: a given string can consist of words and numbers # that are separated by single spaces. # # Example: # s = 'Today is day 18 of April' # the function will return 18 # s = 'Today is day 18 of April and tomorrow is day 19' # the function will return 37 # s = 'Final exam is on the third of May' # the function will return 0 # 4. Write a function that takes 2 dictionaries # and returns a merged dictionary # You may assume all values are string # Example: # d1 = {'a':'a', 'b':'b', 3:'c', 'x':'5', 'y':'6', 'z':'7'} # d2 = {1:'111', 3:'222', 4:'333', 'y':'6', 'z':'7'} # the function would return # {1: '111', 'x': '5', 3: 'c222', 4: '333', 'y': '66', 'b': 'b', 'a': 'a', 'z': '77'}