Question

If a programmer creates a Python module, how can it be used in another program?

(1 point)
Responses

It can’t; it would result in an error message.

It can’t; it would result in an error message.

It can only be used if it becomes an official Python library.

It can only be used if it becomes an official Python library.

It can be used with an import statement.

It can be used with an import statement.

It can be used by creating a new class.

It can be used by creating a new class.
Skip to navigation

page 1 of 1

1 answer

The correct response is:

It can be used with an import statement.

In Python, to use a module created by a programmer in another program, you would typically use the import statement to access the functions, classes, or variables defined in that module.