16
What is the output of the following code?
a = [1, 2, 3, 4, 5]
k = 2
print(a[-k:] + a[:-k])Medium
What is the output of the following code?
a = [1, 2, 3, 4, 5]
k = 2
print(a[-k:] + a[:-k])Log in to join the discussion.