Python 3.X 程式語言特訓教材 8-21頁
a. 至少8字元
b. 只包含英數字
c. 至少要有一個大寫英文字母
pw=input()
validpw = True
if len(pw) <=7 \
or pw.isalpha()\
or pw.isdigit()\
or pw.islower():\
validpw = False
else:
for i in range(0,len(pw)):
if not pw[i].isalpha()\
and not pw[i].isdigit():\
validpw = False
break
#密碼由英數字組成
if validpw:
print(“Valid password”)
else:
print(“Invalid password”)




![使用 Python 檢驗字符串格式:掌握正則表達式(Regular Expression)的起始^與終止$符號, pattern = r’^GATR[0-9]{4}$’ 使用 Python 檢驗字符串格式:掌握正則表達式(Regular Expression)的起始^與終止$符號, pattern = r’^GATR[0-9]{4}$’](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2024/07/20240712093637_0.png?quality=90&zoom=2&ssl=1&resize=350%2C233)



![Python:如何使用 PyMuPDF (import fitz ) 提取 PDF 文本區塊並存儲為 DataFrame ; text: List[ Tuple[float|str|int] ] = page.get_text(“blocks”) Python:如何使用 PyMuPDF (import fitz ) 提取 PDF 文本區塊並存儲為 DataFrame ; text: List[ Tuple[float|str|int] ] = page.get_text(“blocks”)](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2025/03/20250320084417_0_7783bd.png?quality=90&zoom=2&ssl=1&resize=350%2C233)


近期留言