Interview questions banks will ask when you say you can code in Python
Nowadays, everyone wants to learn how to code in Python and, thanks to vibe coding, pretty much anyone can do it. For an investment banking technology job, however, you’ll also need to have strong foundational knowledge in the language itself.
Click here to join the bubble by eFinancialCareers, our new anonymous community. ✍️
If you list Python on your CV and apply to a role involving Python, there are various questions banks will ask to test your knowledge. One investment bank technologist, speaking anonymously, told us the main things to know are “the major syntactic elements of Python (lambda expressions, filtering iterables, etc.), as well as the core data structures and how they work.” You should also have “opinions on the type system and interpreted nature of the language.”
Below are a list of 23 questions Python developers have been asked in job interviews at major banks based on Glassdoor submissions:
-
What is a singleton class and how do you implement it in Python?
-
When should you use multithreading in Python code instead of multiprocessing?
-
Do multithreaded programs in Python run parallel to each other?
-
What is object-oriented programming?
-
Why is Python called a dynamically typed programming language?
-
What is Python inheritance and its advantages
-
What is the difference between tuples and lists?
-
What are decorators in Python?
-
What are lambda functions in Python
-
Take us through a project in which you used Python
-
What kinds of models do you know how to run in Python?
-
What Python packages do you use most frequently?
-
How do you code a binary search in Python?
-
What is the difference between a dictionary and a list in Python
-
How do you implement a string method in Python?
-
How do you look at open files while running a Python script?
-
What are the properties of Python’s classes.
-
What is the global interpreter lock (GPL) in Python.
-
What is the main difference between a language like Python and a language like C?
-
What is the difference between mutable and immutable types in Python
-
Do you know why NumPy is so much faster than regular Python?
-
What is the difference between an array and a linked list?
-
What is PEP8?
-
How do you build a Monte Carlo simulation in Python?
Perhaps the most important question is ‘Why is Python called a dynamically typed programming language?’ The technologist said it’s his favourite question to ask in interviews because “if you can really code in Python, you’ll know the answer.” When answering, you should note that the data types are checked at run-time, whereas statically typed languages require you to declare the data type of a variable before you can use it.
Interviewers will also make wild generalisations in the hope that you’ll correct them. The technologist said that you may be asked, ‘What’s a list comprehension?’ If you answer correctly, they may follow up with, ‘So it’s the equivalent of a for-loop appending to list?’ It’s important that you can describe the differences; “In the list comprehension, we know what the size of the result is going to be,” the technologist said. “Therefore, Python can allocate the memory upfront, which is much more efficient than dynamically adding to a list.”
When speaking about Python libraries, interviewers “like to know that you’re at least aware of things like NumPy and Pandas.” In the age of AI, demonstrating knowledge of TensorFlow, PyTorch, and the differences between them is also a bonus.
You may not recognise everything in the list above, but that’s okay. “It’s natural for interviewers to see how deep a candidate’s knowledge goes,” the technologist said. “My advice is to be upfront and not get flustered when you don’t know something so the interview can quickly move on to something you might know.”
As you should already know, you’ll likely need to complete some live coding challenges in your interview. You can click the following links to see Leetcode questions asked by Goldman Sachs and Morgan Stanley.
Have a confidential story, tip, or comment you’d like to share? Contact: Telegram: @AlexMcMurray, WhatsApp: (+1 269 237 3950). Click here to fill in our anonymous form, or email [email protected].
Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)
link
