Exam4Training

Which of the following snippets will let you access the variable?

A Python module named pymod.py contains a variable named pyvar.

Which of the following snippets will let you access the variable? (Select two answers)
A . import pyvar from pymod pyvar = 1
B . from pymod import pyvar = 1
C . from pymod import pyvar pyvar ()
D . import pymod pymod.pyvar = 1

Answer: A,D

Exit mobile version