Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Routine Poutine26,050 Points
This video seems to indicate that Python's syntax is: from x import y
Am I write about the same words, but different order here? Python and ECMA2015.
Michael Hulet47,912 Points
import things in 2 ways with Python. First of all, let's say we have this file:
Now, if we have another Python file, we can use the code in that file like this:
Alternatively, we could use it like this:
from module import one
from module import two
Notice that when we do it the first way, with just the
import statement, it imports everything in that file, and we can access individual things in that file by writing