DEV Community

Discussion on: 50 Python Interview Questions and Answers

Collapse
 
dwd profile image
Dave Cridland

There are so many things in here which are flat-out incorrect or warped beyond recognition it's really quite concerning.

People have already pointe dout Question 2 and Question 13, but there's plenty of other examples.

Question 11 manages to omit the key property of inheritance (that of substitution allowing specialisation). Question 12 makes me cry, especially following on from Question 11, which is literally about one form of polymorphism that it somehow fails to mention.

It's a particular shame because Python is rich in polymorphic techniques, from Row Polymorphism (aka Duck Typing) to Inclusion Polymorphism (aka subtyping and inheritance) to Polytypism (where we don't care about the type at all for much of the code).

If an interviewer accepts some of these answers as correct for anything but an entry-level Junior position, I'd worry about accepting the job.