Skip to main content

from in Python




While using Import, you can also import a part of the module. "from" is used for that purpose. Math module for instance has a lot of features but we are bothered about the 'Floor' functionality. In this case we imported floor directly (in line 17th) from math using they keyword 'from'. Math is not required while calling 'floor' in case you directly imported floor.











Comments