user_text = input('Введите текст: ')
replace_count = 0
new_text_list = []
colon = ':'
semicolon = ';'
text_list = list(user_text)
for i, symb in enumerate(text_list):
if symb == colon:
symb = semicolon
replace_count += 1
res_text = ''.join(text_list)
print(res_text)
print('Количество замен ', replace_count)
user_text = input('Введите текст: ')
replace_count = 0
new_text_list = []
colon = ':'
semicolon = ';'
text_list = list(user_text)
for i, symb in enumerate(text_list):
if symb == colon:
text_list[i] = semicolon
replace_count += 1
res_text = ''.join(text_list)
print(res_text)
print('Количество замен ', replace_count)