What do you know about NoSQL databases?
Answer:
These databases scale well horizontally: data is distributed across cluster nodes, which helps handle high loads and large volumes. Different storage models are supported — key-value, document, columnar, and graph. This allows choosing the appropriate structure for a specific task.
Common systems include MongoDB (documents), Cassandra (columns), Redis (key-value), and Neo4j (graphs). They are used where scalability, speed, and data flexibility are important.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
PyData Careers
Python Data Science jobs, interview tips, and career insights for aspiring professionals.
Admin: @HusseinSheikho || @Hussein_Sheikho
Admin: @HusseinSheikho || @Hussein_Sheikho
What does it mean that a QuerySet in Django is "lazy"?
Answer:
The actual database access happens only when the results are really needed: when iterating over the QuerySet, calling list(), count(), first(), exists(), and other methods that require data.
This approach helps avoid unnecessary database hits and improves performance — queries are executed only at the moment of real necessity.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
PyData Careers
Python Data Science jobs, interview tips, and career insights for aspiring professionals.
Admin: @HusseinSheikho || @Hussein_Sheikho
Admin: @HusseinSheikho || @Hussein_Sheikho
👍1
What is the difference between calling
start() and run() on threading.Thread?Answer:
If you call run() directly, it will execute in the current thread like a normal function — without creating a new thread and without parallelism.
This is the key difference: start() launches a separate execution thread, while run() just runs the code in the same thread.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
PyData Careers
Python Data Science jobs, interview tips, and career insights for aspiring professionals.
Admin: @HusseinSheikho || @Hussein_Sheikho
Admin: @HusseinSheikho || @Hussein_Sheikho
👍1
What does
nonlocal do and where can it be used?Answer:
This is often used in closures to maintain and update state between calls to the nested function.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤3
How does Django handle an HTTP request?
Answer:
After that, the template forms an HTML response based on the provided data, and Django sends it back to the client.
This is how Django organizes work following the MVT pattern: URL → view → logic and data → template → HTTP response.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤2
How does the module import mechanism work in Python and what is
sys.path?Answer:
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤3
What are optimistic and pessimistic locking in the context of databases?
Answer:
Pessimistic locking assumes conflicts are likely. Therefore, data is locked immediately upon reading or writing and remains locked until the end of the transaction. This prevents concurrent modifications but reduces scalability and can lead to deadlocks.
Optimistic locking assumes conflicts are rare. Data is read without locking, and before committing changes, a version check is performed to see if someone else has modified the data. If so, the transaction is rolled back and retried. This approach offers better performance under low contention.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤3
What is ORM and what is SQLAlchemy used for?
Answer:
With SQLAlchemy, you can describe tables as classes, rows as objects, and perform SELECT, INSERT, UPDATE, DELETE operations through Python methods.
This simplifies working with databases, makes the code more readable, reduces the risk of SQL injections, and facilitates maintenance and migrations.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤6
What is the difference between
pass, continue, and break?Answer:
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤7👏1
How does the
map() function work?Answer:
tags:#interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤5
What can be a key in a dictionary?
Answer:
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤4👏3
Why does
isinstance(True, int) return True?Answer:
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤6👍1
What is Big O notation?
Answer:
For example, O(n) grows linearly, O(n²) - quadratically, O(1) - does not depend on the size of the input.
Big O does not give exact figures, but allows you to compare algorithms in terms of their scalability.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤7
What is
__slots__?Answer:
There is one restriction: it is not possible to add an attribute that is notslotsts__. To retain the ability to dynamically create fields, you can dictct__ to the list of slots.
tags:
Please open Telegram to view this post
VIEW IN TELEGRAM
❤5👎1
What is a message broker and which ones are typically used with Python?
Answer:
In Python projects, RabbitMQ, Apache Kafka, and Redis are often used as simple broker solutions (for example, in combination with Celery). The choice depends on the tasks: Kafka for stream processing, RabbitMQ for flexible routing, and Redis for simple queues.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤4
What is an S3 storage and what is it used for?
Answer:
It is scalable, reliable, and provides access to files via URLs. Unlike traditional file systems, S3 does not have a folder hierarchy — everything is stored as objects in "buckets" (containers), and access can be controlled through policies and permissions.
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤6
Why don't you need to store a session when using JWT?
Answer:
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
❤2