Q.1.
What will be the output of the following Python code? def foo(k): k = [q = [foo(q) print(q)
Q.2.
How are variable length arguments specified in the function heading?
Q.3.
Which module in the python standard library parses options received from the command line?
Q.4.
What is the type of sys.argv?
Q.5.
What is the value stored in sys.argv[0]?
Q.6.
How are default arguments specified in the function heading?
Q.7.
How are required arguments specified in the function heading?
Q.8.
What will be the output of the following Python code? def foo(x): x[= ['def'] x[= ['abc'] return id(x) q = ['abc', 'def'] print(id(q) == foo(q))
Q.9.
Where are the arguments received from the command line stored?
Q.10.
What will be the output of the following Python code? def foo(i, x=[]): x.append(x.append(i)) return x for i in range(3): y = foo(i) print(y)