Skip to content

Instantly share code, notes, and snippets.

@aseevlx
Created October 19, 2015 13:07
Show Gist options
  • Save aseevlx/f76feca4b6c8f1c63169 to your computer and use it in GitHub Desktop.
Save aseevlx/f76feca4b6c8f1c63169 to your computer and use it in GitHub Desktop.
19.10.15
A
n = input().split()
k = input().split()
z = int(k[0])+1
n.append(0)
for i in n[int(k[0]):-1]:
n[z] = i
z += 1
n[int(k[0])] = int(k[1])
print(n)
B
n = input().split()
k = int(input())
z = k
for i in n[k+1:]:
n[z] = i
z += 1
n.pop(-1)
print(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment