[Tutor] Finding all the letters in a string?

Andrew Nelsen sxkorean at gmail.com
Tue Sep 18 05:42:37 CEST 2007


Thanks, everyone, for your help.

It was a pretty narrow question because it's a pretty specific task, but
only because I was guessing there was more than one way of shelling an
acorn. My original idea was something a lot like:


lst = []
chars = '@*&^$&*^@$g*(&@$*(&$@c(*&*(&c^&%&^%'
for x in chars:
   if x in string.ascii_letters
       lst.append(x)

But I was guessing there was an easier way (There was.). I'm actually
working through this one site called http://www.pythonchallenge.com. Seems
like a nifty way to learn a little more python.

Thanks,
Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070917/fa47458a/attachment.htm 


More information about the Tutor mailing list