pymod.py file contains =>
pyvar = 1
def pyfun():
print(pyvar)
python3 =>
>>> import pymod
>>> pymod.pyfun()
1
>>> from pymod import pyfun
>>> pyfun()
1
>>> from pymod import *
>>> pymod.pyfun()
1
>>> import pyfun from pymod
File "<stdin>", line 1
import pyfun from pymod
^
SyntaxError: invalid syntax
A,B, C are all correct. But B is better than C.
Best answer : A & B
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
macxsz
2 years, 6 months agoNorasit
2 years, 7 months agorocky48
2 years, 8 months agozantrz
10 months agoDTL001
2 years, 11 months ago