According to the datetime exercise to use the datetime module, we would need to specify the object and the module name:
from <module_name> import <object_name> ex: from datetime import datetime
However, for the random module exercise, the syntax is different:
- Is this because the random module doesn’t have multiple objects to use like the datetime module?
- Does the
import randomsyntax equate to
import <module_name>and does this mean that it’s importing the entire random module?
- For datetime, is it only importing the datetime object from the datetime module?