C859 Python Questions With Complete Solutions
f1 = open("/my_path/my_", "r") correct answer: to open and read a file f1 = open("/my_path/my_", "w") correct answer: to open and write a file (all previous material discarded) f1 = open("/my_path/my_", "a") correct answer: to open and add to a file () correct answer: read a file into a string ("hello!") correct answer: writes to a file ine() correct answer: reads next line () correct answer: closes a file (must always close a file!) with open("/my_file...etc) as f: correct answer: opens, allows work, and automatically closes a file timedelta correct answer: time library function to calculate time amounts from datetime import timedelta correct answer: grabs timedelta from the datetime library
Escuela, estudio y materia
- Institución
- Western Governers University
- Grado
- WGU C859
Información del documento
- Subido en
- 12 de julio de 2023
- Número de páginas
- 6
- Escrito en
- 2022/2023
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
c859 python questions with complete solutions
Documento también disponible en un lote