- Af(a=1, b=1, c=2, d)
- Bf(a=1, b=1, c=2)
- Cf(a=1, b, c=2)
- Df(a=1, b)
The correct answer is: __init__.py
The correct keyword used for creating a method inside a class is:
def
So, the correct answer is: def
The exception that occurs when an undefined object is accessed in Python is:
NameError
So, the correct answer is: NameError
The statement that is not a valid way to import the module 'm1' or the functions 'f1' and 'f2' defined in it is:
import f1, f2 from m1
The correct syntax for importing specific functions from a module is:
from m1 import f1, f2
So, the correct answer is: import f1, f2 from m1
Correct answer is: TypeError
The correct expression to check if the file 'C:\Sample.txt' exists and is also a regular file is:
os.path.isfile("C:\Sample.txt")
So, the correct answer is: os.path.isfile("C:\Sample.txt")
True. Any Python script can act like a module. In Python, a module is simply a file containing Python definitions and statements. These modules can be reused in other Python scripts by importing them using the import statement. A Python script becomes a module when it contains reusable code that can be imported into other scripts.