arr = list(range(1,21))
a,b = map(int,input().split())
start,end = a-1,b-1
arr[start:end+1] = arr[end:start-1:-1]

print(arr)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: