Python备忘单

时间:2021-02-22 22:29:39
【文件属性】:
文件名称:Python备忘单
文件大小:22KB
文件格式:ZIP
更新时间:2021-02-22 22:29:39
Python Python备忘单 方便的备忘单。 字符串参考备忘单 在Python中,字符串可以做很多事情。 在该备忘单中,您将找到最常用的字符串操作和字符串方法。 字符串运算 len(string)返回字符串的长度 用于字符串中的字符遍历字符串中的每个字符 如果字符串中的子字符串检查子字符串是否是字符串的一部分 string [i]访问从零开始的字符串索引i处的字符 string [i:j]访问从索引i开始到索引j-1结束的子字符串。 如果省略i,则默认为0。 如果省略j,则默认为len(string)。 字符串方法 string.lower()/ string.upper()返回带有所有大写/小写字符的字符串的副本 string.lstrip()/ string.rstrip()/ string.strip()返回没有左/右/左或右空格的字符串副本 string.count(substring)返回
【文件预览】:
Python-Cheatsheet-main
----nametag_generator.py(548B)
----dictionary_email_list.py(555B)
----dictionary_groups_per_user.py(853B)
----palindrome_string_checker.py(1KB)
----oop_city_class.py(2KB)
----name_age_job_formatter.py(888B)
----dictionary_sum_total_price.py(710B)
----oop_furniture.py(817B)
----Module4_Assessment()
--------ThirdQuestion.py(1KB)
--------SeventhQuestion.py(1KB)
--------SixthQuestion(1KB)
--------README.md(4KB)
--------FourthQuestion.py(511B)
--------FirstQuestion.py(1KB)
--------FifthQuestion.py(148B)
--------SecondQuestion.py(541B)
----pig_latin.py(731B)
----group_and_members_formatter.py(635B)
----miles_to_km_converter.py(576B)
----oop_track_values.py(2KB)
----rename_files_with_extension.py(871B)
----old_string_replacer.py(2KB)
----octal_converter_to_linux_permissions.py(1KB)
----README.md(18KB)

网友评论