Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created June 28, 2016 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save libert-xyz/5f2d4053f6c7ca54cb94423408eed5ea to your computer and use it in GitHub Desktop.
Save libert-xyz/5f2d4053f6c7ca54cb94423408eed5ea to your computer and use it in GitHub Desktop.
Each command will be of the commands given above. The extend(L) method will not be used. Each command will have its own value(s) separated by a space.
#6/28/16
#python 3
#https://www.hackerrank.com/challenges/python-lists
for i in range(n):
command, *args = input().split()
if 'print' in command:
print (N)
else:
getattr(N,command) (*(int(x) for x in args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment