0% found this document useful (0 votes)
2 views2 pages

Python Full Stack Interview QA

The document provides a comprehensive overview of key Python concepts relevant for full stack interview preparation, including variables, data types, list comprehensions, functions, and recursion. It also covers important topics such as dictionaries, exception handling, APIs, Django ORM, Git, HTTP methods, SQL vs NoSQL, and storage differences in web development. Each concept is succinctly explained with examples where applicable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Python Full Stack Interview QA

The document provides a comprehensive overview of key Python concepts relevant for full stack interview preparation, including variables, data types, list comprehensions, functions, and recursion. It also covers important topics such as dictionaries, exception handling, APIs, Django ORM, Git, HTTP methods, SQL vs NoSQL, and storage differences in web development. Each concept is succinctly explained with examples where applicable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Python Full Stack Interview Preparation - Q&A

1. What is a variable in Python?

A variable is a named location used to store data in memory. Python is dynamically typed, so you don't need to declare

the type.

2. What are Python's basic data types?

int, float, str, bool, list, tuple, set, dict are the common built-in data types.

3. What is a list comprehension?

A concise way to create lists using a single line: [x for x in range(5)]

4. What is a function and how is it declared?

Functions are blocks of code that perform a task. Use 'def' keyword: def greet(): print('Hello')

5. What is the difference between list and tuple?

Lists are mutable, tuples are immutable. Tuples are faster and use less memory.

6. What is recursion?

A function calling itself. Useful for problems like factorial, Fibonacci, etc.

7. What is a dictionary in Python?

A collection of key-value pairs. Example: {'name': 'Alice', 'age': 25}

8. How do you handle exceptions in Python?

Using try-except blocks: try: risky_code() except Exception as e: print(e)

9. What is an API?

API (Application Programming Interface) allows two applications to talk. In web, REST APIs use HTTP methods to

send/receive data.
Python Full Stack Interview Preparation - Q&A

10. What is the purpose of Django ORM?

It allows interaction with the database using Python classes instead of raw SQL queries.

11. What is the use of Git?

Git is a version control system to manage code versions, collaborate, and track changes.

12. What are HTTP methods used in REST APIs?

GET - fetch data, POST - create, PUT - update, DELETE - remove.

13. What is the difference between SQL and NoSQL?

SQL is relational (tables), NoSQL is non-relational (documents, key-value, etc.).

14. What is the difference between localStorage and sessionStorage?

localStorage persists even after browser close, sessionStorage clears when the tab is closed.

15. What is the difference between == and is in Python?

== checks value equality, 'is' checks identity (same memory location).

You might also like