----- Original Message -----
> From: Jugurtha Hadjar <jugurtha.had...@gmail.com> > To: tutor@python.org > Cc: > Sent: Friday, September 20, 2013 4:50 PM > Subject: [Tutor] AntiSpam measures circumventing > > Hello, > > I shared some assembly code (microcontrollers) and I had a comment wit > my e-mail address for contact purposes. > > Supposing my name is John Doe and the e-mail is john....@hotmail.com, my > e-mail was written like this: > > removemejohn.dospames...@removemehotmail.com' > > With a note saying to remove the capital letters. > > Now, I wrote this : > > for character in my_string: > ... if (character == character.upper()) and (character !='@') and > (character != '.'): > ... my_string = my_string.replace(character,'') > > > And the end result was john....@hotmail.com. > > Is there a better way to do that ? Without using regular expressions > (Looked *really* ugly and it doesn't really make sense, unlike the few > lines I've written, which are obvious even to a beginner like me). I used this a while ago. It's not Python, but it's effective: http://www.jottings.com/obfuscator/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor