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

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