林詩容Python字串string

單元371影片

vs code與w3schools截圖

程式碼

w3schools字串方法列表

txt = "林詩容 love 葡萄, 葡萄是我 are my favorite 水果葡萄"
print(txt.count("葡萄蘋果"))
print('先練習內建函數len',len(txt))
print('find',txt.find("葡萄"))
print('rfind',txt.rfind("葡萄"))
字串 方法() 函數LEN(字串) CHR(字碼)

留言

這個網誌中的熱門文章

林詩容PYTHON自訂函數迴圈範圍rang寫入模式a.x.t.r

林詩容eval=evaluate函數calculator美國男生印度女生,調色板