Code golf challenge: XKCD 936 passwords

Chris Angelico rosuav at gmail.com
Tue Oct 8 16:35:24 EDT 2013


On Wed, Oct 9, 2013 at 7:27 AM,  <sprucebondera at gmail.com> wrote:
> On Tuesday, October 8, 2013 5:47:56 AM UTC-10, rand... at fastmail.us wrote:
>> Importing random as r doesn't actually save anything, since " as r" is
>> the same five characters you saved from the one use of it.
>
> I realize, it just looks nicer than the original __import__, and since it doesn't add any characters...
> The optimization was using readlines.

Are you aware that readlines keeps the \n at the end of each line,
though? Looks a lot less clean in its output that way. That's why I
used .split() in the first place.

ChrisA



More information about the Python-list mailing list