劉任昌w3schools字串str, format, slicing[::]

w3schools

程式碼

#劉任昌strings可以用單引雙引只要對稱
b = '狗吃屎,兔吃菜,貓抓鼠,劉任昌很帥'
#    0 1 23 4 5 678 9 10,11,12,
print('字串長度' + str(len(b)))
#len函數 字串長度 輸出 整數
#str函數 轉成字串 這樣才能串接
print(b[-5:-2])
#練習字串格式format
quantity = "精華下午茶"
itemno = 5
price = "劉任昌"
myorder = "我要吃 {} 吃幾個 {},和 {} 誰一起吃"
print(myorder.format(quantity, itemno, price)) 

留言

  1. https://cpc920508123.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  2. https://spencer0309.blogspot.com/2023/03/w3schoolsstrformatslicing.html

    回覆刪除
  3. https://pandora-mo.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  4. https://enchenghu0905.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  5. https://d11150115.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  6. https://d11150114.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  7. https://xdrcfvghyujiok8945656.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  8. https://hhhaann.blogspot.com/2023/03/w3schoolstr-format-slicing.html

    回覆刪除
  9. https://jasperyang.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  10. https://liiuzhewei.blogspot.com/2023/03/w3schoolsslicing.html

    回覆刪除
  11. https://changmasaxciksdj.blogspot.com/2023/03/w3schoolsstrformatslicing.html

    回覆刪除
  12. https://trequiem.blogspot.com/2023/03/w3schoolsslicingformatstrings.html

    回覆刪除
  13. https://tgyhjikolujik2554.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  14. https://wutimothy.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  15. 作者已經移除這則留言。

    回覆刪除
  16. https://643gjeytfru4312.blogspot.com/2023/03/w3schoolsslicing.html

    回覆刪除
  17. https://efnmklfnmk.blogspot.com/2023/03/blog-post.html

    回覆刪除
  18. https://d11150116.blogspot.com/2023/03/w3schoolsslicing.html

    回覆刪除
  19. https://chenjainqi.blogspot.com/2023/03/w3schoolsstrformatslicing.html

    回覆刪除
  20. https://iuytjhg5261.blogspot.com/2023/03/w3schoolsstrformatslicing.html

    回覆刪除
  21. https://cindy-javascript.blogspot.com/2023/03/w3schoolsstrformatslicing.html

    回覆刪除
  22. https://html-css-javascript-yaoto.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  23. https://jdoifjopq1264.blogspot.com/2023/03/w3schoolsstr-format-slicing.html

    回覆刪除
  24. https://d11150112.blogspot.com/2023/03/w3schoolsslicing.html

    回覆刪除
  25. https://www.blogger.com/blog/post/edit/7946957304410713297/2646592622665957456

    回覆刪除

張貼留言

這個網誌中的熱門文章

劉任昌對照Python與JavaScript指令

劉任昌Python集合set清單list元組tuple字典dictionary

劉任昌python, input, str, float