python 列印可見字元
f = open(u'e:\\桌面\\a.txt')
Fchar = f.read()
f.close()
k = ""
for j in Fchar:
# j = j.decode('gbk')
# print len(j)
# j = j.encode('gbk')
# print len(j)
# for i in j:
# if ord(i) <= 128:
# k += i
if ord(j) <= 128 and ord(j) >= 32:
k += j
elif ord(j) == 9 or ord(j) == 10 or ord(j) == 13:
k += j
if k == "":
pass
else:
print k
Fchar = f.read()
f.close()
k = ""
for j in Fchar:
# j = j.decode('gbk')
# print len(j)
# j = j.encode('gbk')
# print len(j)
# for i in j:
# if ord(i) <= 128:
# k += i
if ord(j) <= 128 and ord(j) >= 32:
k += j
elif ord(j) == 9 or ord(j) == 10 or ord(j) == 13:
k += j
if k == "":
pass
else:
print k
相關文章
- Python 可列印字元、UTF8相關(qbit)Python字元
- Python 列印中文字元Python字元
- python的list要列印中文字元Python字元
- 找出非列印字元方法字元
- java列印!到~之間的字元Java字元
- 列印可自定義的字母金字塔(python實現)Python
- python列印菱形Python
- python常見面試題講解(二)計算字元個數Python面試題字元
- 前端列印console.log 字元畫前端字元
- python 列印 ASCII表PythonASCII
- bash中常見特殊字元使用大全字元
- excel怎麼多餘空格或非列印字元?Excel資料清洗函式Trim去除多餘空格及Clean去除列印字元Excel字元函式
- Linux命令之strings - 列印檔案中的可列印字串Linux字串
- 用python實現列印省、市、縣三級選單 可返回上一級 可隨時退出程式Python
- python怎麼列印listPython
- Python列印乘法表Python
- python列印乘法口訣Python
- 用FDM列印會遇到的3D列印常見問題詳解3D
- python字元對映表和字元替換Python字元
- PostgreSQL vacuum可見性SQL
- 設定View的可見以及不可見View
- 12c 可擴充套件的字元型別MAX_STRING_SIZE與常見錯誤套件字元型別
- Sql Server去除表中的不可見字元SQLServer字元
- 1.3.0 Python 字元編碼Python字元
- python中怎麼列印漢字Python
- python中怎麼列印陣列Python陣列
- Python拆分列中文和 字元Python字元
- Python中的轉義字元Python字元
- Python字元編碼詳解Python字元
- PostgreSQL MVCC可見性判斷SQLMVC
- Volatile可見性分析(一)
- Java包範圍可見性Java
- Synchronized同步性與可見性synchronized
- Python3獲取XX管理局可見資料學習案例Python
- 再(也不)見——隨處可見的BAD UI!UI
- 提高程式碼可維護性(2)---日誌列印
- C#移除字串中的不可見Unicode字元C#字串Unicode字元
- 列印 Python 的一切 —— pprint & beeprintPython