Please enable JavaScript to use CodeHS

Python Basics Glossary

Flashcards

Course:

Module:

Lesson:

Search:

File General

a digital container that holds information or data on a computer

Input Device JavaScript

A device used to give commands or send information to a computer

Output Device General

A device a computer uses to show or present information to a user

File I/O JavaScript

The process if reading data from a file or writing data to a file

open() Python

The action of establishing a connection between a file and a program to perform read or write operations on the file.

close() Python

The action of terminating the connection between a file and a program after completing read or write operations.

read() Python

A method used to read the contents of a file. It reads the entire file or a specified number of characters and returns them as a string.

Read mode Python

A file access mode (“r”) that allows reading the contents of a file but does not permit modifications.

readline() Python

A method used to read a single line from a file. It returns the line as a string, including the newline character at the end.

Newline character Python

A special character that represents the end of a line within a text file. In Python, the newline character is represented as \n.

readlines() JavaScript

A method used to read multiple lines from a file and return them as a list, where each line is represented as an element in the list.