Are there generics in Python like in Java or C++?
Answer:
tags: #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
300 Real Time SQL Interview.pdf
4.5 MB
300 Real Time SQL Interview practical Questions Asked at multiple companies
••••••••••••••••••••••••••••••••••••••••••••••••••••••
Anyone who's preparing for an interview just reading theoretical concept will not help definitely you need to have practical hands on in #sql so create table with some data and try this queries running by your self so can help you to understand the logic of similar kind of queries
If you're preparing for an interview this doc will help a lot in the perpetration If you're experienced also freshers can also get hands on by practicing these queries and get confidence.
••••••••••••••••••••••••••••••••••••••••••••••••••••••
Anyone who's preparing for an interview just reading theoretical concept will not help definitely you need to have practical hands on in #sql so create table with some data and try this queries running by your self so can help you to understand the logic of similar kind of queries
If you're preparing for an interview this doc will help a lot in the perpetration If you're experienced also freshers can also get hands on by practicing these queries and get confidence.
https://news.1rj.ru/str/DataScienceQ
❤3
Forwarded from Machine Learning with Python
🚀 THE 7-DAY PROFIT CHALLENGE! 🚀
Can you turn $100 into $5,000 in just 7 days?
Lisa can. And she’s challenging YOU to do the same. 👇
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
Can you turn $100 into $5,000 in just 7 days?
Lisa can. And she’s challenging YOU to do the same. 👇
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
❤2
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
Forwarded from Machine Learning with Python
🚀 THE 7-DAY PROFIT CHALLENGE! 🚀
Can you turn $100 into $5,000 in just 7 days?
Lisa can. And she’s challenging YOU to do the same. 👇
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
Can you turn $100 into $5,000 in just 7 days?
Lisa can. And she’s challenging YOU to do the same. 👇
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
https://news.1rj.ru/str/+AOPQVJRWlJc5ZGRi
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
Please open Telegram to view this post
VIEW IN TELEGRAM
❤5
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
💸 PacketSDK--A New Way To Make Revenue From Your Apps
Regardless of whether your app is on desktop, mobile, TV, or Unity platforms, no matter which app monetization tools you’re using, PacketSDK can bring you additional revenue!
● Working Principle: Convert your app's active users into profits 👥→💵
● Product Features: Ad-free monetization 🚫, no user interference
● Additional Revenue: Fully compatible with your existing ad SDKs
● CCPA & GDPR: Based on user consent, no collection of any personal data 🔒
● Easy Integration: Only a few simple steps, taking approximately 30 minutes
Join us:https://www.packetsdk.com/?utm-source=SyWayQNK
Contact us & Estimated income:
Telegram:@Packet_SDK
Whatsapp:https://wa.me/85256440384
Teams:https://teams.live.com/l/invite/FBA_1zP2ehmA6Jn4AI
⏰ Join early ,earn early!
Regardless of whether your app is on desktop, mobile, TV, or Unity platforms, no matter which app monetization tools you’re using, PacketSDK can bring you additional revenue!
● Working Principle: Convert your app's active users into profits 👥→💵
● Product Features: Ad-free monetization 🚫, no user interference
● Additional Revenue: Fully compatible with your existing ad SDKs
● CCPA & GDPR: Based on user consent, no collection of any personal data 🔒
● Easy Integration: Only a few simple steps, taking approximately 30 minutes
Join us:https://www.packetsdk.com/?utm-source=SyWayQNK
Contact us & Estimated income:
Telegram:@Packet_SDK
Whatsapp:https://wa.me/85256440384
Teams:https://teams.live.com/l/invite/FBA_1zP2ehmA6Jn4AI
⏰ Join early ,earn early!
❤3
🐍 Tricky Python Interview Question
> What will this code output and why?
❓Question: Why are list1 and list3 the same?
🔍 Explanation:
Default arguments in Python are evaluated once — at function definition, not at each call.
So lst=[] is created once and preserved between calls if you don't explicitly pass your own list.
🧠 What happens:
- extend_list(10) → uses the shared list [], now it is [10]
- extend_list(123, []) → creates a new list [123]
- extend_list('a') → again uses the shared list → [10, 'a']
👉 Result:
✅ How to fix:
If you want a new list created by default on each call, do this:
This is a classic Python interview trap — mutable default arguments.
It tests if you understand how default values and memory scope work.
https://news.1rj.ru/str/DataScienceQ⭐️
> What will this code output and why?
def extend_list(val, lst=[]):
lst.append(val)
return lst
list1 = extend_list(10)
list2 = extend_list(123, [])
list3 = extend_list('a')
print(list1, list2, list3)
❓Question: Why are list1 and list3 the same?
🔍 Explanation:
Default arguments in Python are evaluated once — at function definition, not at each call.
So lst=[] is created once and preserved between calls if you don't explicitly pass your own list.
🧠 What happens:
- extend_list(10) → uses the shared list [], now it is [10]
- extend_list(123, []) → creates a new list [123]
- extend_list('a') → again uses the shared list → [10, 'a']
👉 Result:
[10, 'a'] [123] [10, 'a']✅ How to fix:
If you want a new list created by default on each call, do this:
def extend_list(val, lst=None):
if lst is None:
lst = []
lst.append(val)
return lst
This is a classic Python interview trap — mutable default arguments.
It tests if you understand how default values and memory scope work.
https://news.1rj.ru/str/DataScienceQ
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
❤5
⛓️ Tricky Python Interview Question
> What will this code output and why?
❓ Question: Why does this code print 2, 2, 2 instead of 0, 1, 2?
🔍 Explanation:
This is a classic example of late binding in Python closures. The lambda functions don't capture the value of
🧠 What happens:
• The
• The
• When you call each function
👉 Result:
2
2
2
✅ How to fix:
You can force the lambda to capture the value of
This trick works because default arguments are evaluated when the function is defined, not when it's called. This will correctly print:
0
1
2
This is a common interview question that tests your understanding of closures, scope, and late binding in Python.
━━━━━━━━━━━━━━━
By: @DataScienceQ ✨
> What will this code output and why?
funcs = []
for i in range(3):
funcs.append(lambda: print(i))
for f in funcs:
f()
❓ Question: Why does this code print 2, 2, 2 instead of 0, 1, 2?
🔍 Explanation:
This is a classic example of late binding in Python closures. The lambda functions don't capture the value of
i at each step of the loop. Instead, they all hold a reference to the same variable i.🧠 What happens:
• The
for loop completes. By the end of the loop, the variable i holds the value 2.• The
funcs list contains three functions, but each one is defined to print the value of whatever i is at the time of execution.• When you call each function
f(), it looks up the current value of i in its enclosing scope, which is 2.👉 Result:
2
2
2
✅ How to fix:
You can force the lambda to capture the value of
i at the time of definition by using a default argument.funcs = []
for i in range(3):
# The default argument captures i's value at definition time
funcs.append(lambda num=i: print(num))
for f in funcs:
f()
This trick works because default arguments are evaluated when the function is defined, not when it's called. This will correctly print:
0
1
2
This is a common interview question that tests your understanding of closures, scope, and late binding in Python.
━━━━━━━━━━━━━━━
By: @DataScienceQ ✨
❤5
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
PyData Careers
💸 PacketSDK--A New Way To Make Revenue From Your Apps Regardless of whether your app is on desktop, mobile, TV, or Unity platforms, no matter which app monetization tools you’re using, PacketSDK can bring you additional revenue! ● Working Principle: Convert…
I want to share a tool that I genuinely believe can make a real difference for anyone building apps: PacketSDK. Many developers have strong active-user bases but still struggle to increase revenue. That’s exactly why this solution stands out—it adds extra income without disrupting users or interfering with your existing monetization methods.
Why I strongly recommend it:
* It turns your active users into immediate profit without showing ads.
* Integration is fast and straightforward—around 30 minutes.
* It works on all platforms: mobile, desktop, TV, Unity, and more.
As a channel owner, I recommend trying this service; you have nothing to lose.
I used it and found its earnings amazing.
Why I strongly recommend it:
* It turns your active users into immediate profit without showing ads.
* Integration is fast and straightforward—around 30 minutes.
* It works on all platforms: mobile, desktop, TV, Unity, and more.
As a channel owner, I recommend trying this service; you have nothing to lose.
I used it and found its earnings amazing.
❤2
Interview question
What will this code output and why?
Try to answer yourself first, then check the explanation.
Step-by-step:
Variable a refers to the list [1, 2, 3].
b = a
Now b refers to the same list as a.
Not a copy, but the very same object in memory.
a += [4, 5]
Important: for lists, += works as an in-place modification:
this is roughly the same as:
a.extend([4, 5])
That is, elements 4 and 5 are added to the existing list that both a and b refer to.
Therefore:
Both point to the same modified list.
Part 2. Tuples
a = (1, 2, 3)
b = a
a += (4, 5)
print(a)
print(b)
Tuples are immutable, and here the magic begins.
a = (1, 2, 3)
a refers to the tuple (1, 2, 3).
b = a
b refers to the same tuple (1, 2, 3).
a += (4, 5)
For tuples, += cannot modify the object in place (they are immutable).
So Python does this:
a = a + (4, 5)
That is, a new tuple (1, 2, 3, 4, 5) is created and variable a is reassigned to it.
b still points to the old tuple (1, 2, 3).
Therefore:
print(a) # (1, 2, 3, 4, 5)
print(b) # (1, 2, 3)
The trick
For the list, a += [4, 5] mutates the object in place, visible through all variables referencing it.
For the tuple, a += (4, 5) creates a new object and reassigns only a.
In summary:
If you want, I can explain another tricky question — about mutable default arguments in functions or about loops and closures.
https://news.1rj.ru/str/DataScienceQ
What will this code output and why?
a = [1, 2, 3]
b = a
a += [4, 5]
print(a)
print(b)
a = (1, 2, 3)
b = a
a += (4, 5)
print(a)
print(b)
Try to answer yourself first, then check the explanation.
Part 1. Lists
a = [1, 2, 3]
b = a
a += [4, 5]
print(a)
print(b)
Step-by-step:
a = [1, 2, 3]
Variable a refers to the list [1, 2, 3].
b = a
Now b refers to the same list as a.
Not a copy, but the very same object in memory.
a += [4, 5]
Important: for lists, += works as an in-place modification:
this is roughly the same as:
a.extend([4, 5])
That is, elements 4 and 5 are added to the existing list that both a and b refer to.
Therefore:
print(a) # [1, 2, 3, 4, 5]
print(b) # [1, 2, 3, 4, 5]
Both point to the same modified list.
Part 2. Tuples
a = (1, 2, 3)
b = a
a += (4, 5)
print(a)
print(b)
Tuples are immutable, and here the magic begins.
a = (1, 2, 3)
a refers to the tuple (1, 2, 3).
b = a
b refers to the same tuple (1, 2, 3).
a += (4, 5)
For tuples, += cannot modify the object in place (they are immutable).
So Python does this:
a = a + (4, 5)
That is, a new tuple (1, 2, 3, 4, 5) is created and variable a is reassigned to it.
b still points to the old tuple (1, 2, 3).
Therefore:
print(a) # (1, 2, 3, 4, 5)
print(b) # (1, 2, 3)
The trick
For the list, a += [4, 5] mutates the object in place, visible through all variables referencing it.
For the tuple, a += (4, 5) creates a new object and reassigns only a.
In summary:
# List part:
[1, 2, 3, 4, 5]
[1, 2, 3, 4, 5]
# Tuple part:
(1, 2, 3, 4, 5)
(1, 2, 3)
If you want, I can explain another tricky question — about mutable default arguments in functions or about loops and closures.
https://news.1rj.ru/str/DataScienceQ
Telegram
PyData Careers
Python Data Science jobs, interview tips, and career insights for aspiring professionals.
Admin: @HusseinSheikho || @Hussein_Sheikho
Admin: @HusseinSheikho || @Hussein_Sheikho
❤7
🪙 +30.560$ with 300$ in a month of trading! We can teach you how to earn! FREE!
It was a challenge - a marathon 300$ to 30.000$ on trading, together with Lisa!
What is the essence of earning?: "Analyze and open a deal on the exchange, knowing where the currency rate will go. Lisa trades every day and posts signals on her channel for free."
🔹Start: $150
🔹 Goal: $20,000
🔹Period: 1.5 months.
Join and get started, there will be no second chance👇
https://news.1rj.ru/str/+L9_l-dxOJxI2ZGUy
https://news.1rj.ru/str/+L9_l-dxOJxI2ZGUy
https://news.1rj.ru/str/+L9_l-dxOJxI2ZGUy
It was a challenge - a marathon 300$ to 30.000$ on trading, together with Lisa!
What is the essence of earning?: "Analyze and open a deal on the exchange, knowing where the currency rate will go. Lisa trades every day and posts signals on her channel for free."
🔹Start: $150
🔹 Goal: $20,000
🔹Period: 1.5 months.
Join and get started, there will be no second chance👇
https://news.1rj.ru/str/+L9_l-dxOJxI2ZGUy
https://news.1rj.ru/str/+L9_l-dxOJxI2ZGUy
https://news.1rj.ru/str/+L9_l-dxOJxI2ZGUy
❤4
