Python Basic Interview Questions (2020)
3 min readMay 10, 2020
- What is Python?
- What are the benefits of Python?
- What are the key features of Python?
- What type of language is Python? Programming or Scripting?
- What are the applications of Python?
- What is the difference between list and tuple in Python?
- What are the global and local variables in Python?
- Define PYTHON PATH?
- What are the two major loop statements?
- What do you understand by the term PEP 8?
- How memory management is done in Python?
- What is the principal difference between Java and Python?
- Define modules in Python?
- What are the built-in types available in Python?
- What are Python Decorators?
- How do we find bugs and statistical problems in Python?
- What is the difference between .py and .pyc files?
- How do you invoke the Python interpreter for interactive use?
- Define String in Python?
- What do you understand by the term namespace in Python?
- How do you create a Python function?
- Define iterators in Python?
- How does a function return values?
- Define slicing in Python?
- How can Python be an interpreted language?
- function without return is valid?
- Define package in Python?
- How can we make a Python script executable on Unix?
- Which command is used to delete files in Python?
- Define pickling and unpickling in Python?
- Explain the difference between local and global namespaces?
- What is a boolean in Python?
- What is Python String format and Python String replace?
- Name some of the built-in modules in Python?
- What are the functions in Python?
- What are Dict and List comprehensions in Python?
- Define the term lambda?
- When would you use triple quotes as a delimiter?
- Define self in Python?
- What is _init_?
- Define generators in Python?
- Define docstring in Python?
- How do we convert the string to lowercase?
- How to remove values from a Python array?
- What is Try Block?
- Why do we use the split method in Python?
- How can we access a module written in Python from C?
- How do you copy an object in Python?
- How do we reverse a list in Python?
- How can we debug a Python program?
- Write a program to count the number of capital letters in a file?
- Write a program to display Fibonacci sequence in Python?
- Write a program in Python to produce Star triangle?
- WAP to check whether the given number is prime?
- Python code to check string palindrome or not?
- Write Python code to sort a numerical dataset?
- What is the output of the following code?
- What is the procedure to install Python on Windows and set path variable?
- Differentiate between SciPy and NumPy?
- How do Python arrays and lists differ from each other?
- Can we make multi-line comments in Python?
- What is the difference between range and xrange?
- Explain how can we build or set up the database in Django?
- List out the inheritance styles in Django?
- How to save an image locally using Python in which we already know the URL address?
- How can we access sessions in flask?
- Is flask an MVC model? If yes, justify your answer by showing an example of your application with the help of MVC pattern?
- What are the database connections in Python Flask, explain?
- Explain the procedure to minimize or lower the outage of Memchached server in Python development?
- What is Dogpile effect?
- What are the OOPS concepts in Python?
- Define object in Python?
- What is a class in Python?
- How to create a class in Python?
- What is the syntax for creating an instance of a class in Python?
- Define what is “Method” in Python programming?
- Does multiple inheritance is supported in Python?
- What is data abstraction in Python?
- Define encapsulation in Python?
- What is polymorphism in Python?
- Does Python make use of access specifiers?
- How can we create an empty class in Python?
- Define Constructor in Python?
- How can we create a constructor in Python programming?
- Define Inheritance in Python?
Follow Us on Instagram for more :)