Python100天打卡-Day07 - 字符串和常用数据结构

字符串和常用数据结构 使用字符串 def main(): str1 = 'hello, world!' # 通过len函数计算字符串的长度 print(len(str1)) # 13 # 获得字符串首字母大写的拷贝 print(str1.capitalize()) # Hello, world! # 获得字符串变大写后的拷贝 print(
相关文章
相关标签/搜索