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.
Regexps in programs
Count the letters
Report a typo
Sample Input 1:
AAGAAGTTCCSample Output 1:
A: 4
C: 2
G: 2
T: 2Write a program in Python 3
import re
string = input()
# Write your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.