Python Interview Questions & Answers - Part 5
17) What is unit test in Python?
A unit testing framework in Python is known as unit test. It supports sharing of setups, automation testing, shutdown code for tests, aggregation of tests into collections etc.
18) In Python what is slicing?
A mechanism to select a range of items from sequence types like list, tuple, strings etc. is known as slicing.
19) What are generators in Python?
The way of implementing iterators are known as generators. It is a normal function except that it yields expression in the function.
20) What is docstring in Python?
A Python documentation string is known as docstring, it is a way of documenting Python functions, modules and classes.