On 2012-10-23, at 10:23 PM, seektime <michael.j.kra...@gmail.com> wrote: > My question is how can I turn "seq" into a python array?
Something like this perhaps?: >>> alpha = ('a', 'b') >>> numeric = ('1', '2') >>> L = ['a b a\n', 'b b a\n'] >>> s = ' '.join(L) >>> d = dict(zip(alpha, numeric)) >>> list_ = [d[c] for c in s.strip('\n').split()] >>> list_ ['1', '2', '1', '2', '2', '1'] Demian Brecht @demianbrecht http://demianbrecht.github.com -- http://mail.python.org/mailman/listinfo/python-list