Logo

Python Questions Set 73:

Quiz Mode

 Which module in Python supports regular expressions? 

1
2
3

Solution:

 All classes have the------------------ method. 

1
2
3
4

Solution:

  Overriding means changing behaviour of methods of derived class methods in the base class. 

1
2

Solution:

 

What will be the output of the following Python code snippet?

print('abcefd'.replace('cd', '12'))

1
2

Solution:

 Which of the following can be used to create a directory? 

1
2
3
4

Solution:

What is the output of the following code?


text="""

Abekus

helps us to

improve our knowledge."""


l=len(text)

print(l)

1
2
3
4

Solution:

 What will be the output of the following Python code?

>>>names = ['Amir', 'Bear', 'Charlton', 'Daman']

>>>print(names[-1][-1])

1
2
3
4

Solution:

What will be the output of the following Python code snippet?

print([i.lower() for i in "HELLO"])

1
2
3
4

Solution:

  What does os.close(f) do? 

1
2
3
4

Solution:

 

What Is The Output Of The Following Code Snippet?

def test_var_args(farg, *args):
   print ("formal arg:", farg)
   for arg in args:
       print ("another arg:", arg)
test_var_args(1, "two", 3)

1
2
3

Solution: