發表文章

目前顯示的是 2月, 2024的文章

洪志坤電腦科技發展歷史:軟體vs硬體

圖片
取得連結 Facebook Twitter Pinterest 以電子郵件傳送 其他應用程式 2月 28, 2024 黃仁勳維基百科 黃仁勳Jensen Huang維基百科嵌入以上網頁指令 <iframe width="100%" height="400" src="https://zh.wikipedia.org/zh-tw/%E9%BB%83%E4%BB%81%E5%8B%B3"></iframe> 蘇姿丰Lisa Su維基百科 蘇姿丰維基百科嵌入以上網頁指令 <iframe height="400" src="https://zh.wikipedia.org/zh-tw/%E8%98%87%E5%A7%BF%E4%B8%B0" width="100%"></iframe> nvidia, amd, tsm, intel過去一年股價表現

洪志坤python字串string內建built-in方法methods

圖片
VS Code與w3schools截圖 程式碼 txt = "hello洪志坤, and welcome to my world.ctrl+A" x = txt.capitalize() print (x) print(txt.replace("洪志坤", "總統")) print("and位置",txt.find("and")) a = "Ha,洪志坤很Handsome,很變態!很詭異!我使用w3schools學習,也會使用vsCode開發環境" b = a.replace('變態','瀟灑') print (a) print (b) print ('幾個很?', a.count('很')) print ('很在0,1..位置', a.find('很')) print ('很在0,1..位置', a.rfind('很')) print ('a的長度',len(a)) print('英文大寫',a.upper()) print('英文小寫',a.lower()) txt = "HELLO,將第一個字母轉成大寫。" x = txt.capitalize() print (x) print (txt.casefold()) y = txt.center(30) print(txt.center(30)) print(y) print(len(y)) w3schools字串方法列表 https://www.w3schools.com/python/python_ref_string.asp Method Description capitalize() Converts the first character to upper case casefold() Converts string into lower case center() Returns a centered string count() Returns the number of...