# ---------1
text = input()
text = list(text)
for i in range(len(text)):
if text[i] == ".":
text[i] = "0"
elif text[i] == "x":
text[i] = "1"
text = ''.join(text)
print(text)
#--------2
text = "10a01Bx1010c"
if text[i] == "0":
elif text[i] == "1":
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
# ---------1
text = input()
text = list(text)
for i in range(len(text)):
if text[i] == ".":
text[i] = "0"
elif text[i] == "x":
text[i] = "1"
text = ''.join(text)
print(text)
#--------2
text = "10a01Bx1010c"
text = list(text)
for i in range(len(text)):
if text[i] == "0":
text[i] = "1"
elif text[i] == "1":
text[i] = "0"
text = ''.join(text)
print(text)
merkkaa добавил решение13:59