def decode(encoded):
for x in encoded:
if type(x) == tuple:
for _x in range(x[0]):
yield x[1]
else:
yield x
By now you should know to throw a "list" into the mix if that's the way you swing.
def decode(encoded):
for x in encoded:
if type(x) == tuple:
for _x in range(x[0]):
yield x[1]
else:
yield x
No comments:
Post a Comment