ImageVerifierCode 换一换
格式:DOCX , 页数:16 ,大小:28.29KB ,
资源ID:8774107      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8774107.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(0001aboutSTR.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

0001aboutSTR.docx

1、0001aboutSTR- - - - 延时输出内容# coding:utf-8import sysimport timeout = sys.stdout.writedef pr(aString): for i in aString: out(i) time.sleep(0.01)str文档 help(str)Help on class str in module builtins:class str(object)| Methods defined here: | | _add_(self, value, /) | Return self+value.| _contains_(self, k

2、ey, /) | Return key in self.x = this is a Testing String!print x._add_( hello)print x._contains_(is a Test) | _eq_(self, value, /) | Return self=value. | | _format_(.) | S._format_(format_spec) - str | | Return a formatted version of S as described by format_spec. | | _ge_(self, value, /) | Return s

3、elf=value. | | _getattribute_(self, name, /) | Return getattr(self, name). | | _getitem_(self, key, /) | Return selfkey. | | _getnewargs_(.) | | _gt_(self, value, /) | Return selfvalue. | | _hash_(self, /) | Return hash(self). | | _iter_(self, /) | Implement iter(self). | | _le_(self, value, /) | Re

4、turn self=value. | | _len_(self, /) | Return len(self). | | _lt_(self, value, /) | Return self size of S in memory, in bytes | | _str_(self, /) | Return str(self). | | capitalize(.) | S.capitalize() - str | | Return a capitalized version of S, i.e. make the first character | have upper case and the

5、rest lower case. | | casefold(.) | S.casefold() - str | | Return a version of S suitable for caseless comparisons. | | center(.) | S.center(width, fillchar) - str | | Return S centered in a string of length width. Padding is | done using the specified fill character (default is a space)print x.cente

6、r(50,_)# *this is a Testing String!* | | count(.) | S.count(sub, start, end) - int | | Return the number of non-overlapping occurrences of substring sub in | string Sstart:end. Optional arguments start and end are | interpreted as in slice notation.print x.count( ) | encode(.) | S.encode(encoding=ut

7、f-8, errors=strict) - bytes | | Encode S using the codec registered for encoding. Default encoding | is utf-8. errors may be given to set a different error | handling scheme. Default is strict meaning that encoding errors raise | a UnicodeEncodeError. Other possible values are ignore, replace and |

8、xmlcharrefreplace as well as any other name registered with | codecs.register_error that can handle UnicodeEncodeErrors. | | endswith(.) | S.endswith(suffix, start, end) - bool | | Return True if S ends with the specified suffix, False otherwise. | With optional start, test S beginning at that posit

9、ion. | With optional end, stop comparing S at that position. | suffix can also be a tuple of strings to try. | | expandtabs(.) | S.expandtabs(tabsize=8) - str | | Return a copy of S where all tab characters are expanded using spaces. | If tabsize is not given, a tab size of 8 characters is assumed.

10、| | find(.) | S.find(sub, start, end) - int | | Return the lowest index in S where substring sub is found, | such that sub is contained within Sstart:end. Optional | arguments start and end are interpreted as in slice notation. | | Return -1 on failure. | | format(.) | S.format(*args, *kwargs) - str

11、 | | Return a formatted version of S, using substitutions from args and kwargs. | The substitutions are identified by braces ( and ). | | format_map(.) | S.format_map(mapping) - str | | Return a formatted version of S, using substitutions from mapping. | The substitutions are identified by braces (

12、and ). | | index(.) | S.index(sub, start, end) - int | | Like S.find() but raise ValueError when the substring is not found. | | isalnum(.) | S.isalnum() - bool | | Return True if all characters in S are alphanumeric | and there is at least one character in S, False otherwise. | | isalpha(.) | S.isa

13、lpha() - bool | | Return True if all characters in S are alphabetic | and there is at least one character in S, False otherwise. | | isdecimal(.) | S.isdecimal() - bool | | Return True if there are only decimal characters in S, | False otherwise. | | isdigit(.) | S.isdigit() - bool | | Return True i

14、f all characters in S are digits | and there is at least one character in S, False otherwise. | | isidentifier(.) | S.isidentifier() - bool | | Return True if S is a valid identifier according | to the language definition. | | Use keyword.iskeyword() to test for reserved identifiers | such as def an

15、d class.import keywordprint keyword.iskeyword(def) | | islower(.) | S.islower() - bool | | Return True if all cased characters in S are lowercase and there is | at least one cased character in S, False otherwise. | | isnumeric(.) | S.isnumeric() - bool | | Return True if there are only numeric chara

16、cters in S, | False otherwise. print 98673.isalnum() | isprintable(.) | S.isprintable() - bool | | Return True if all characters in S are considered | printable in repr() or S is empty, False otherwise. | | isspace(.) | S.isspace() - bool | | Return True if all characters in S are whitespace | and t

17、here is at least one character in S, False otherwise. | | istitle(.) | S.istitle() - bool | | Return True if S is a titlecased string and there is at least one | character in S, i.e. upper- and titlecase characters may only | follow uncased characters and lowercase characters only cased ones. | Retu

18、rn False otherwise. | | isupper(.) | S.isupper() - bool | | Return True if all cased characters in S are uppercase and there is | at least one cased character in S, False otherwise. | join(.) | S.join(iterable) - str | | Return a string which is the concatenation of the strings in the | iterable. Th

19、e separator between elements is S. | | ljust(.) | S.ljust(width, fillchar) - str | | Return S left-justified in a Unicode string of length width. Padding is | done using the specified fill character (default is a space). | | lower(.) | S.lower() - str | | Return a copy of the string S converted to l

20、owercase. | | lstrip(.) | S.lstrip(chars) - str | | Return a copy of the string S with leading whitespace removed. | If chars is given and not None, remove characters in chars instead. | | partition(.) | S.partition(sep) - (head, sep, tail) | | Search for the separator sep in S, and return the part

21、before it, | the separator itself, and the part after it. If the separator is not | found, return S and two empty strings. | | replace(.) | S.replace(old, new, count) - str | | Return a copy of S with all occurrences of substring | old replaced by new. If the optional argument count is | given, only

22、 the first count occurrences are replaced.print 98673.replace(86, _RPLS_) | rfind(.) | S.rfind(sub, start, end) - int | | Return the highest index in S where substring sub is found, | such that sub is contained within Sstart:end. Optional | arguments start and end are interpreted as in slice notatio

23、n. | | Return -1 on failure. | import sysx = this is a Testing String!print xfor i in xrange(len(x): sys.stdout.write(str(i % 10)printprint x.rfind( ) print x.rfind( ,0,17) | rindex(.) 等同于上面的函数 | S.rindex(sub, start, end) - int | | Like S.rfind() but raise ValueError when the substring is not found.

24、 | | rjust(.) | S.rjust(width, fillchar) - str | | Return S right-justified in a string of length width. Padding is | done using the specified fill character (default is a space). | | rpartition(.) | S.rpartition(sep) - (head, sep, tail) | | Search for the separator sep in S, starting at the end of

25、S, and return | the part before it, the separator itself, and the part after it. If the | separator is not found, return two empty strings and S. | | rsplit(.) | S.rsplit(sep=None, maxsplit=-1) - list of strings | | Return a list of the words in S, using sep as the | delimiter string, starting at th

26、e end of the string and | working to the front. If maxsplit is given, at most maxsplit | splits are done. If sep is not specified, any whitespace string | is a separator. | | rstrip(.) | S.rstrip(chars) - str | | Return a copy of the string S with trailing whitespace removed. | If chars is given and

27、 not None, remove characters in chars instead. | | split(.) | S.split(sep=None, maxsplit=-1) - list of strings | | Return a list of the words in S, using sep as the | delimiter string. If maxsplit is given, at most maxsplit | splits are done. If sep is not specified or is None, any | whitespace stri

28、ng is a separator and empty strings are | removed from the result. | | splitlines(.) | S.splitlines(keepends) - list of strings | | Return a list of the lines in S, breaking at line boundaries. | Line breaks are not included in the resulting list unless keepends | is given and true. | | startswith(.) | S.startswith(prefix, start, end) - bool |

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1