Ответ:
x = int(input("Type yout three-digit num: "))
digits = [0, 0, 0]
for i in range (0, 3):
digits[2 - i] = x % 10
x //= 10
#a
flag = 0
for i in range (0, 3):
for j in range(0, 3):
if digits[i] == digits[j] and i != j:
flag = 1
break
if flag == 1:
print("a) Yes")
break
if flag == 0:
print("a) No")
#b
if digits[0] == digits[2]:
print("b) Yes")
else:
print("b) No")