Python Developer Interviews

Python Developer Interview Questions

"Python developers are responsible for developing code to build products using the python programming language. In an interview context, expect to be quizzed on your technical skills through different kinds of computing problems or brainteasers. The specific questions you are asked will depend on what type of programming position you are looking for. Try researching a specific discipline such as web development, application development, or system development."

6,412 python developer interview questions shared by candidates

Thanks for applying to our position. To further analyze your skills in Python, I would like for you to analyze the below code and answer the questions, def advert_match_geo(advert, country_id): if advert.countries: if advert.geo_setting == 'Include': matching_countries = tuple(filter(lambda x: not x or x == country_id, advert.countries)) if advert.geo_setting == 'Include' and not matching_countries: return False elif advert.geo_setting == 'Exclude': matching_countries = tuple(filter(lambda x: x == country_id, advert.countries)) if advert.geo_setting == 'Exclude' and matching_countries: return False return True Q: What does this code do? Q: Is this code syntactically valid? Q: What is wrong with the algorithmic structure of this code? Q: Assume that this function is called frequently with similar inputs. Is this function a good candidate for caching / memorization?

Python Developer

Interviewed at WWWPromoter

2.2
Feb 27, 2017

Thanks for applying to our position. To further analyze your skills in Python, I would like for you to analyze the below code and answer the questions, def advert_match_geo(advert, country_id): if advert.countries: if advert.geo_setting == 'Include': matching_countries = tuple(filter(lambda x: not x or x == country_id, advert.countries)) if advert.geo_setting == 'Include' and not matching_countries: return False elif advert.geo_setting == 'Exclude': matching_countries = tuple(filter(lambda x: x == country_id, advert.countries)) if advert.geo_setting == 'Exclude' and matching_countries: return False return True Q: What does this code do? Q: Is this code syntactically valid? Q: What is wrong with the algorithmic structure of this code? Q: Assume that this function is called frequently with similar inputs. Is this function a good candidate for caching / memorization?

Viewing 3221 - 3230 interview questions

Glassdoor has 6,412 interview questions and reports from Python developer interviews. Prepare for your interview. Get hired. Love your job.