Skip to content

Instantly share code, notes, and snippets.

@edwrodrig edwrodrig/demo.py
Created Mar 27, 2019

Embed
What would you like to do?
Demo de clase de python 2019-03-27
import sys
largo = len(sys.argv)
if largo < 2:
print 'error'
exit()
entrada = sys.argv[1]
largo = len(entrada)
inicio = 0
fin = 0
for i in range(0, largo):
if entrada[i] == '[':
inicio = i
if entrada[i] == ']':
fin = i
out = ''
for i in range(inicio + 1, fin):
out += entrada[i]
print out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.