PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#wow, if that so, then your code is too complicated
#im too kind today, so i will give u the code.
completestr = "malayalam"
incompletestr = "malayala"
missing = []
#length of completestr,
lencompletestr = len(completestr)
for i in range(lencompletestr):
#we use try because possibility the length of the completestr and incompletestr is not the same. may rise IndexError
try:
if (completestr[i]!=incompletestr[i]):
missing.append(completestr[i])
except IndexError:
missing.append(completestr[i])
print(missing)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run