KnowledgeBoat Logo

Computer Science

What is dot notation of referring to objects inside a module ?

Python Libraries

3 Likes

Answer

After importing a module using import module statement, to access one of the functions, we have to specify the name of the module and the name of the function, separated by a dot. This format is called dot notation.
For example:

import math
print(math.pi)
print(math.sqrt(25))

Answered By

2 Likes


Related Questions