Import DateTime is the introduction of the entire DateTime package, and if you use a DateTime class in a DateTime package, you need to add the module name qualification.
1 Import datetime2 3 print Datetime.datetime.now ()
If you do not add a module name qualification, an error occurs: TypeError: ' Module ' object is not callable \ Attributeerror: ' Module ' object have no attribute ' now '
The From datetime import datetime is a DateTime class that is only introduced in a DateTime package and does not require the qualification of the module name when it is used.
1 from datetime import datetime2 3 print DateTime.Now ()
Summary : Python imports modules in two ways: Import module and from module import, the difference is that the former all imported things to use with the module name qualification, the latter do not need.
Ext.: http://www.cnblogs.com/xxoome/p/5880693.html
When Python introduces a module, the import differs from the From ... import (GO)