Ответ:
text = input("N: ")
def replace_digits(input_string):
return ''.join([str(int(char) - 1) if char.isdigit() and char != '0' else char for char in input_string])
print(replace_digits(text))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
text = input("N: ")
def replace_digits(input_string):
return ''.join([str(int(char) - 1) if char.isdigit() and char != '0' else char for char in input_string])
print(replace_digits(text))