首页 > 其他 > 详细

String constants

时间:2015-07-31 14:37:44      阅读:252      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!