項目跟進之Day07-字符串和常用數據結構

part1.需留意的常用類方法或者函數 1.字符串 str.capitalize() #字符串首字母變大寫 str.upper() #字符串大寫 str.find(‘or’) or str.index() #查找子串的位置 str.startswith() #是否以某一字符串開頭 str.endswith #是否以某一字符串結尾 str.center(50,’*’) #居中 指定寬度,填充字符 s
相關文章
相關標籤/搜索