Ответ:
string = list(input('Введите строку: '))
for i in range(len(string)):
if string[i] == 'а':
string[i] = 'б'
elif string[i] == 'б':
string[i] = 'а'
elif string[i] == 'А':
string[i] = 'Б'
elif string[i] == 'Б':
string[i] = 'А'
print(''.join(string))
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
string = list(input('Введите строку: '))
for i in range(len(string)):
if string[i] == 'а':
string[i] = 'б'
elif string[i] == 'б':
string[i] = 'а'
elif string[i] == 'А':
string[i] = 'Б'
elif string[i] == 'Б':
string[i] = 'А'
print(''.join(string))
Объяснение: