import re

 

st = "Show me the money"

find_char = input("write alphabet in \n")

 

nthloc = "{} is at the {}th location,"

totalchar = "this string has {} of {} character."

 

output = ""

 

for a in re.finditer(find_char, st):

    output += nthloc.format(find_char, a.start()) + " "

 

char_count = st.count(find_char)

output += totalchar.format(char_count, find_char)

 

print(output)







여기서 import re안쓰고 똑같이 출력되게하려면 어떡게해야%A