I am running into issue with my code, it does not pass the check and I receive the following:
Your code didn’t print anything.
Expected Correct Output
4 5 1 2 3
TypeError : ‘map’ object is not subscriptable
Traceback (most recent call last):
File “/hackerearth/PYTHON3_5a8c_5f3d_8e23_3dcf/s_cb41_69bc_c648_ad7d.py3”, line 7, in
TypeError: ‘map’ object is not subscriptable
I was hoping someone could help me fix my code and understand the meaning of the errors.
t = int(input()) while t!=0: n,k = map(int, input().split()) arr = map(int, input().split()) index = n - (k%n) for i in range(index, n): print(arr[I]) for i in range(index): print(arr[I]) print("") t-=1