You are viewing a single comment's thread. Return to all comments →
Same idea, but if d is an integer with no restrictions, this works:
shifted = a[d%n:] + a[:d%n] for num in shifted: print(num, end=' ')
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Same idea, but if d is an integer with no restrictions, this works: