Count the letters

Report a typo

You have a sequence that is made up of 4 letters ('A', 'C', 'G', 'T'). Write a program that counts how many times each letter appeared in the sequence, and prints it. If the letter does not occur in the string, then you shouldn't print it. Follow the format in the example below.

Sample Input 1:

AAGAAGTTCC

Sample Output 1:

A: 4
C: 2
G: 2
T: 2
Write a program in Python 3
import re

string = input()
# Write your code here
___

Create a free account to access the full topic