Em Sáb, 2006-04-15 às 18:09 -0400, Terry Reedy escreveu: > # given string s > binchars = [] > for c in s: binchars.append(a2b[ord(c)])
Faster: binchars = [a2b[ord(c)] for c in s] -- Felipe. -- http://mail.python.org/mailman/listinfo/python-list
Em Sáb, 2006-04-15 às 18:09 -0400, Terry Reedy escreveu: > # given string s > binchars = [] > for c in s: binchars.append(a2b[ord(c)])
Faster: binchars = [a2b[ord(c)] for c in s] -- Felipe. -- http://mail.python.org/mailman/listinfo/python-list