开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜