ExamPlay Light Logo
Нэвтрэх

Computer Science for IGCSE & O level - Programming (Section 11 - No. 30)

What does the 'x' mode do when you open a file?
Opens the file for reading.
Opens the file for writing; creates a new file if it does not exist.
Creates the file if it does not exist and opens it for writing.
Opens the file in append mode.

Тайлбар

'x' creates a new file and opens it for writing if the file doesn't already exist. If it does, it will raise an error.

Смхиман (0)

Сэтгэгдэл бичихийн тулд нэвтэрнэ үү
Сурталчилгаа
BrainBehindX Inc Logo
©2026; Powered by BrainBehindX Inc