Python: Email addresses
Python 3
# --开发者_JS百科 coding: utf-8 --email = input ( 'Email: ' )print email # oÓ.öŐ §'"+!%/=()@uÚ.üŰ §'"+!%/=().com
I would like:
print email # oo.oo@uu.uu.com
- Latin 1 (ISO-8859-1) characters, at sign (@) and dot (.).
- Lowletters.
- The (white) space and special characters are delete.
Sorry, I speak a little English.
Thank you!
What you are looking for can be accomplished with the string.translate()
function.
See: Python Docs - String.
See also: This tutorial.
精彩评论