Question 3
What will be the output of the following Python code? string1 = 'database' string2 = 'baseball' L = [] for i in range(len(string1)): for j in range(len(string2)): if string1[i] == string2[j]: L.append(string1[i]) break else: continue print(L)
['a', 'a', 'b', 'a', 's', 'e']
['a', 't', 'a', 'b', 'a', 's', 'e']
['a', 'b', 'a', 's', 'e']
['a', 'a', 'b', 's', 'e']