x = int(input("Введите число: "))
y = list(str(x))
a = int(input("Введите начальную позицию числа: "))
b = int(input("Введите конечную позицию числа: "))
for i in range(len(y)):
for j in range(len(y)):
if i == a - 1 and j == b - 1: # индексация начинается с 0
y[i], y[j] = y[j],y[i]
else:
continue
print(int(''.join(y).strip('')))
classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
]