码迷,mamicode.com
首页 > 其他好文 > 详细

String constants

时间:2015-07-31 14:40:16      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:

官方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.

String constants

标签:

原文地址:http://www.cnblogs.com/hhj187/p/4691943.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!