r/learnpython•
FunCicada

What's the difference between these two import statements?

I have a separate module file with a single function in it with the same name as the file. I get an error when I saw "import func.func" but no error when I say "from func import func". What exactly is the difference between these two import statements?

Posted Jul 11, 2018, 10:41 PM UTC

92
Loading comments…