python之路-06-字符串操作

    #!Author:lanhan name = "my  \tname is {name} and i an {year} old " print(name.capitalize())   #首字母大寫 print(name.count("a"))    #統計a出現次數 print(name.center(50,"-"))  #字符串在中間,兩邊用-補齊 print(name.endswi
相關文章
相關標籤/搜索