String constants

官方https://docs.python.org/3.4/library/string.html#string.Formatter

6.1. string — Common string operations

Source code: Lib/string.py


6.1.1. String constants

The constants defined in this module are:

string. ascii_letters

The concatenation of the ascii_lowercase and ascii_uppercase constants described below. This value is not locale-dependent.

string. ascii_lowercase

The lowercase letters 'abcdefghijklmnopqrstuvwxyz'. This value is not locale-dependent and will not change.

string. ascii_uppercase

The uppercase letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. This value is not locale-dependent and will not change.

string. digits

The string '0123456789'.

string. hexdigits

The string '0123456789abcdefABCDEF'.

string. octdigits

The string '01234567'.

string. punctuation

String of ASCII characters which are considered punctuation characters in the C locale.

string. printable

String of ASCII characters which are considered printable. This is a combination of digitsascii_letterspunctuation, and whitespace.

string. whitespace

A string containing all ASCII characters that are considered whitespace. This includes the characters space, tab, linefeed, return, formfeed, and vertical tab.

转载于:https://www.cnblogs.com/hhj187/p/4691943.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值