0
take the input and reassign the element in the index to x, then print the list
items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] num = int(input()) C=(items[num-1]) items[C]=("x") print(items) its working 3 out of 4 times, but the broken one is hidden, so i dont know what my error is. based on what its taught me, this should work
2 ответов
+ 2
Maybe try C=num-1
+ 2
I believe, the input value is the index to be used, but if it is a pro challenge, then non-pro users can't see the details of the challenge.
You just need to set the;
items[num] = 'x'
Then output items