You are not building one list, you are continually replacing your list with a new one:
for i in otp:
important_list = [base_dict[i]]
Here the [...]
syntax creates a new list object with just one element.
You could create the object just once, empty, then use list.append()
to add elements:
important_list = []
for i in otp:
important_list.append(base_dict[i])
or use a list comprehension:
important_list = [base_dict[i] for i in otp]
The dictionary is a little overkill here though; you could use ord()
to get the ASCII codepoint instead and subtract 64:
important_list = [ord(i) - 64 for i in otp]
as ord('A')
is 65.