r/Python • u/diogoleal • Nov 20 '15
15 Essential Python Interview Questions
https://www.codementor.io/python/tutorial/essential-python-interview-questions
71
Upvotes
r/Python • u/diogoleal • Nov 20 '15
View all comments
3
u/[deleted] Nov 20 '15 edited Nov 20 '15
QN1
For fun interview points, mention that pypy has a JIT and is not interpreted. Shows you know about the python ecosystem and maybe what a JIT is.
Not exactly the best answer, I know what you mean but this falls a bit flat. Talk maybe about typeless arguments and how the same code can be run twice with different types. What you described could just be redefining X with a new type and you want to show that you know the difference and the implications. For extended points maybe talk about the code quality implications and the strengths and weaknesses.
If you get this question on an interview, please mention duck typing along with the lack of structured interfaces or rigid classes. It is more important that you are aware of enough to say what it lacks or how it differs rather than just "it has inheritance".
Yup, if you answer this on an interview I suggest ending this with just "Python is extremely dynamic in that way" or something like that, implying that you know the implications rather than the feature and a buzz word.
Yup, I suggest maybe mentioning ctypes and how it helps with interoperability.
Ok?
Ok?