程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Wuhan University of technology Python Program Design Chapter 8 test

編輯:Python

Close file object file The sentence is :

B. file.close()

Open the file in read mode and allow updates ,mode The parameter value should be set to :

C. ‘r+’

Open file in append write mode ,mode The parameter value should be set to :

C. ‘a’

file “ In the Quiet Night .txt” The code of is “utf-8”, The output of the following program statement is :

‍with open(“ In the Quiet Night .txt”, ‘r’, encoding=“UTF-8”) as f:
print(f)

C. <_io.TextIOWrapper name=‘ In the Quiet Night .txt’ mode=‘r’ encoding=‘utf-8’>

pandas Read from csv The format file method is :

B. read_csv()

In the string s Of json The data is decoded as python The method of data type application is :

A. json.loads(s)

take python Format object obj Encoded as json The way to format is :

A. json.dumps(obj)

Return... As a list path The method of file name under the path is :

B. os.listdir()

The method to obtain the current working path is :

A. os.g


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved