file = open('金融常識.txt','r',encoding='utf-8')
reading = file.read()
file.close()
print('檔案字元characters數:', len(reading))
mySet = set(reading)
myDict = dict()
for j in mySet:
myDict[j] = 0
for i in reading:
myDict[i] += 1
for j in mySet:
print(f"字元「{j}」出現{myDict[j]:,}次數")
print(f'劉任昌python計算字元數目{len(reading):,},不同字元數{len(mySet):,}')
print(f'劉任昌python計算字元左圓括號出現的次數{myDict["("]:}')
print(f"劉任昌python計算字元右圓括號出現的次數{myDict[')']:,}")
print(f"劉任昌python計算字元「金」出現的次數{myDict['金']:,}")
print(F'''劉任昌python計算格式化字串統計「管﹞{myDict['管']}''')
字元「殖」出現3次數
字元「百」出現9次數
字元「略」出現7次數
字元「飆」出現1次數
字元「結」出現30次數
字元「仍」出現6次數
字元「取」出現26次數
字元「好」出現21次數
字元「託」出現179次數
字元「面」出現29次數
字元「H」出現2次數
字元「未」出現27次數
字元「午」出現1次數
字元「幫」出現3次數
字元「權」出現96次數
字元「片」出現1次數
字元「棄」出現1次數
字元「櫃」出現18次數
字元「簽」出現18次數
字元「同」出現49次數
字元「外」出現53次數
字元「‧」出現1次數
字元「啟」出現1次數
劉任昌python計算字元數目37,241,不同字元數1,251
劉任昌python計算字元左圓括號出現的次數2061
劉任昌python計算字元右圓括號出現的次數2,061
劉任昌python計算字元「金」出現的次數474
劉任昌python計算格式化字串統計「管﹞115
https://huang070207.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://star2136.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://kuozhehao.blogspot.com/2026/10/pythonlistset.html
回覆刪除https://leeenming.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://draft.blogger.com/blog/post/edit/982784999076711761/334663015952956163
回覆刪除https://www.blogger.com/blog/post/edit/2808613682252230357/8989366147868642829
回覆刪除https://huangzhehui.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://huang-hsin-ju.blogspot.com/2026/10/pythonlistrset372411251.html
回覆刪除https://asdfgktifdjjej.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://chenyueying.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://wangzhixian0508.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://chang-yun-yun.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://yppp077.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://leeyousin.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://lzr0914.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://ianchen67.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://wei-chen-chang.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://www.blogger.com/blog/post/edit/6829750777930789143/9205244959942542069
回覆刪除作者已經移除這則留言。
回覆刪除https://www.blogger.com/blog/post/edit/7117219004802242035/2215671963688012033
回覆刪除https://yangxinzhen.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://hsy08311111.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://lin-takming.blogspot.com/2026/10/pythonlistset37241.html
回覆刪除https://ludingfeng.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://wumeiyingying181818.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://wangyuzhen.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除https://jiexin0713.blogspot.com/2026/10/pythonlistset.html
回覆刪除https://griuyijglkrijlrtfgfgf.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://changjiahul.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://huangpeiling16.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://teresa18885.blogspot.com/2026/10/blog-post.html
回覆刪除https://zhiyao01.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://chenjunjie592.blogspot.com/2026/10/blog-post.html
回覆刪除https://zhonghexiao.blogspot.com/2026/10/w3schoolsstrlistsetdicttuple-10-04-2026.html
回覆刪除https://leexinni819.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://cynthia088.blogspot.com/2026/10/file-open.html
回覆刪除https://liushaouchi.blogspot.com/2026/10/pythonlistset372411251.html
回覆刪除https://yubiyu.blogspot.com/2026/10/pythonsetdict372411251.html
回覆刪除