Home >>Python Keywords >Python import Keyword

Python import Keyword

Python import Keyword

Python import keyword helps you to import a module.

Here is an example of Python import Keyword:

import datetime
z = datetime.datetime.now()
print(z)

Output:
2020-03-27 05:49:26.596484
Example 2:

import datetime
a= datetime.datetime.now()
print(a)

Output:
2020-03-27 05:49:26.596484