开发者

Python: Email addresses

开发者 https://www.devze.com 2023-04-11 06:32 出处:网络
Python 3# --开发者_JS百科 coding: utf-8 --email = input ( \'Email: \' )print email # oÓ.öŐ §\'\"+!%/=()@uÚ.üŰ §\'\"+!%/=().com

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

精彩评论

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

关注公众号