只在此山中,雲深不知處


聽首歌



© 2018 by Shawn Huang
Last Updated: 2018.5.27

字串

頭前 轉厝 後壁

字串基本操作


裁剪(strip, lstrip, rstrip)


分割(split, rsplit, partition, rpartition)


計數(count)


首尾字串(startswith, endswith)與尋找(find, rfind, index, rindex)


大小寫轉換(upper, lower, swapcase, isupper, islower, capitalize, casefold)  pyfile4.py


判斷內容(isalpha, isdecimal, isdigit, isnumeric,isalnum, isspace)


置中(CENTER)


填滿(zfill, ljust, rjust)


加入(join)


轉換(maketrans,translate)與代換(replace)