r/learnpython • • Feb 20 '21

What are you having difficulty learning or are currently struggling to learn?

I'm curious what the community here has difficulty with when it comes to learning Python. Partly because I want to see if the more experienced community here (or myself) can help point you into the right direction. . . but also because I'm trying to come up with video tutorial ideas for future content and would love to hear from Python learners what would be most useful to dedicate our time on.

I'm looking forward to hearing what you guys have to say!

417 Upvotes

324 comments sorted by

View all comments

4

u/gokstudio Feb 20 '21

The import system

0

u/OriginalTyphus Feb 20 '21

As far as i understand it, all Import does is to load all the code from a module into your py file .

If you have a foo.py with a function like this:

def bar(): print("sth")

You can import foo and just use it like

foo.bar()

And the result is

sth

1

u/gokstudio Feb 21 '21

I understand that. I'm talking about how imports should work when inside a module or package

1

u/OriginalTyphus Feb 21 '21

Does it work differently there ?

2

u/gokstudio Feb 21 '21

It's more about how best to access other files in your package directory structure etc. I think for me, I get confused about how relative imports are supposed to work and also about how the new changes to the system have impacted my understanding.