Skip to content

Instantly share code, notes, and snippets.

@zenito9970
Last active February 22, 2016 12:16
Show Gist options
  • Save zenito9970/aae382f747c72da0d077 to your computer and use it in GitHub Desktop.
Save zenito9970/aae382f747c72da0d077 to your computer and use it in GitHub Desktop.
class iostream:
def __init__(self):
self.s = []
self.i = 0
def next(self, T=str):
if(self.i < len(self.s)):
ret = self.s[self.i]
self.i += 1
return T(ret)
st = input()
while(st == ""):
st = input()
self.s = st.split(" ")
self.i = 0
return T(self.next(T))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment