In [ ]:
prot_seq = 'MKALIVLGLVLLSVTVQGKVFERCELARTLKRLGMDGYRGISLANWMCLAKWESGYNTRATNYNAGDRSTDYGIFQINSRYWCNDGKTPGAVNACHLSCSALLQDNIADAVACAKRVVRDPQGIRAWVAWRNRCQNRDVRQYVQGCGV'

print(sorted(list(set(prot_seq))))

f_dict = {}
f_dict['A'] = prot_seq.count('A')
f_dict['C'] = prot_seq.count('C')
f_dict['D'] = prot_seq.count('D')
f_dict['E'] = prot_seq.count('E')
print(f_dict)

print('frequency of A is', prot_seq.count('A'))
print('frequency of C is', prot_seq.count('C'))
print('frequency of D is', prot_seq.count('D'))
print('frequency of E is', prot_seq.count('E'))

print('frequency of A is', f_dict['A'])
print('frequency of C is', f_dict['C'])
print('frequency of D is', f_dict['D'])
print('frequency of E is', f_dict['E'])