My input code is list1=[1,2,3,4,5,6,7,8,9] for i in range(len(list1)-1,-1,-1): print(list[i],end=' ') print() Output: list[8] list[7] list[6] list[5] list[4] list[3] list[2] list[1] list[0]
Hi,
On Friday, November 12th, 2021 at 11:32, Jagannath Devarakonda devarakondajagannath6378@gmail.com wrote: My input code is
list1=[1,2,3,4,5,6,7,8,9] for i in range(len(list1)-1,-1,-1): print(list[i],end=' ') print()
This is not a mailing list about general help, please try https;//discuss.python.org next time.
About your issue, I think there's a typo in your `print` line, you meant `list1` not `list1.
Hope it helps, Bests, -- Julien Palard https://mdk.fr