Interview Python: Most Asked Interview Questions
Interview Python: Most Asked Interview Questions
INTERVIEW
QUESTIONS
Most asked Interview Questions
BY : CODE OF GEEKS
CODE OF GEEKS
Q. What is CPython ?
A. This is the standard python compiler implemented in C language.
Q. What is PEP 8 ?
A. It is Python Enhancement Proposal. It refers to the formatting of python
code for maximum readability and understandability.
For LINUX :
1. Open your terminal;
2. Open the file ~/.bashrc in your text editor – e.g. atom ~/.bashrc;
3. Add the following line to the end:
export PYTHONPATH=/home/my/code and save it.
Q. What is self ?
A. It is an object or an instance of a class,which is explicitly included as first
argument.
def simgen():
print(x.__next__())
output : 1
import os
Q. Explain docstring ?
A. A String written in triple quotes, which generally gives a complete
introduction of class.
Q. What is an Interface ?
A. Interface can be defined as the abstract class containing no concrete
methods.
Q. Can you name some Exceptions that may occur during execution
of a program ?
A. Arithmetic Exception, Type Error, Syntax Error, Assertion Error, EOF
Error.
Q. Explain regex ?
A. Python has a built-in package called re , which can be used to work with
Regular Expressions.
Q. Write a python code for retrieving all words starting with ‘a’ from a
string ” mystring “.
A. res = re.findall(r ‘ a[\w]* ‘, mystring)
Q. What is a Thread ?
A. Thread is a smallest executable unit.
Q. What is Flask ?
A. Flask is a light weighted web micro framework, It is used to build web
applications with Python.
Q. What is Django ?
Q. What is Pyramid ?
A. It is a web framework for larger applications, they are heavily
configurable.
Q. Explain SciPy ?
A. All numerical code resides inside SciPy. It is used for large and complex
algebraic functions.
So, these are the 100 most asked interview questions on Python
Programming Language.
We, at CODE OF GEEKS, wish you all the best for your upcoming future.