On Wed, May 25, 2011 at 11:25 PM, Wolf Halton <wolf.hal...@gmail.com> wrote:
> Is there a less clunky way to do this? > [code] > def new_pass(): > series = ['`', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', > '=', \ > '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', > '+', \ > 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', > '\\', \ > 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', > '|', \ > 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', "'", \ > 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', \ > 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', \ > 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?'] > > > well. i would have made the series list as follows: >>> a=[chr(i) for i in range(33,127)] >>> a ['!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_' , '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o' , 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~']
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor