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

1 answer

The correct response is:

It can be used with an import statement.

In Python, a programmer can create a module (a file containing Python code) and then use it in another program by importing it using the import statement.