1.字符串的定义和遍历 str1 ="hello python" str2 ='我的外号是"大西瓜"' print(str2) print(str1[6]) str3="测试一下长度" for char in str3: print(char) 2. .字符串的统计操作 1.统计字符串长度 hello_str ="hello hello" print(len(hello_str))