CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 3: 98-381: Introduction to Programming Using Python

You develop a Python application for your school. You need to read and write data to a text file. If the file does not exist, it must be created. If the file has content, the content must be removed. Which code should you use?

Nội dung câu hỏi

You develop a Python application for your school. You need to read and write data to a text file. If the file does not exist, it must be created. If the file has content, the content must be removed. Which code should you use?

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. open("local_data", "r")
  2. B. open("local_data", "r+")
  3. C. open("local_data", "w+") — đáp án hiện tại
  4. D. open("local_data", "w")

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề