Python interview questions I can use in interviews
Python interview questions - Software Engineering Stack Exchange
What sort of question to prepare for python interview?
Interviews vary wildly based on the role and industry so you won't get a good answer for types of questions.
The key to coding interviews is to talk openly about what you're thinking. Wondering whether something will work? Tell them you have a hunch and are testing a possible solution. Worried you're skipping too much good practice? Tell them what you'd normally do, eg "I'd usually put a docstring here but I'll skip those for an interview".
They're mostly trying to work out how you think and approach problems so keep a running monologue going.
More on reddit.comWhat should I expect in technical interview for a Python developer job
How about a senior engineer position?
More on reddit.comHow can I prepare for Python programming interview questions?
Where can I find Python interview questions and answers?
Are Python interview questions for experienced candidates different?
Videos
Recently my workplace has started hiring python developers and since I'm one of the python guy I am asked to take python interviews starting today.
Now in my 4-5 years of learning and working with python I have accumulated a lot python challenges in my head as I'd constantly trying to come up questions that an interviewer might ask me.
Yesterday I made some samples questions and share with my senior who found the questions little too deep for a 3 YOE Python full stack developer role.
Please give me few questions to get some idea that I can use or be inspired from to make new set of questions.
Also is this question really too much for such interview: Given a file containing very large string (around a gb), devise an optimal solution to get the first non repeating Character.
Here are some easy ones:
- What are Python decorators and how would you use them?
- How do you debug your Python code?
- How would you setup many projects where each one uses different versions of Python and third party libraries?
- Do you follow PEP8 while writing your code?
How about something involving Python list comprehensions? To me, those were one of the big selling points over C++, after I read about them in Dive into Python.
"Write a list comprehension that builds a list of the even numbers from 1 to 10 (inclusive)".
Where the answer is anything like this (note the range values avoid a fencepost error):
foo = [x for x in range(1, 11) if (x % 2) == 0]
print foo
[2, 4, 6, 8, 10]
For that matter, if you understand all the concepts listed in Dive into Python, that should cover most of the important features.