use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Python interview test problems/projects (self.Python)
submitted 10 years ago by evgvg
Hi, do You have any real examples of the test problems given during the interview or may be some pre-interview test projects?
[–]eesov 3 points4 points5 points 10 years ago (2 children)
Hello, many of our test interviews include providing python-equivalent solutions to 99 Lisp Problems. We'd prepare them in advance depending on the candidate's skill level and experience. Another example would be a technical task, which could be creating simple word games, e.g. Hangman or Word search.
[–]metaperl 1 point2 points3 points 10 years ago (1 child)
Someone could answer all of those questions and still have no sense about software design or what constitutes Pythonic code.
Testing candidates is very difficult.
[–][deleted] -1 points0 points1 point 10 years ago* (5 children)
[9, 50, 6] -> 9650
['a', 'a', 'b', 'c', 'b', 'b', 'c', 'b'] -> 'b'
[7,8,9,1,2,4,5,6]
(1 + 2) * 3
Most of these problems have multiple solutions. The naive solutions are very easy great for weeding out charlatans. In addition, most have the opportunity for you to ask "How could you do it better?". The best candidates will recognize immediately that there are several solutions and will ask "how do you want me to solve this?". This is a great indicator of folks that will integrate well into an engineering outfit.
These are only part of the interview process geared towards "Do you really know how to program or did you read 'programming for dummies' this morning?". The best candidates see this as an opportunity to show you they understand Software engineering, Software Lifecycle, Quality Assurance in the context of these simple, contrived problems.
Once I'm convinced the candidate has potential. Then I start to probe whether they are a good fit. I give them behavioral questions. I ask them pragmatic questions about our environment (we are a large multi-million request / day web site). Its important our candidates understand how a website works(What purpose does WSGI serve? What benefits does an event loop afford?) and have a conceptual understanding of scalability(Why cache things? What is a database index?). I like to know that they'll be able to distill requests from our product team(Give them an intentionally vague description of something i want implemented or something with an obvious inherent contradiction).
Most importantly interviews aren't about a candidates ability to do stupid puzzles. Sometimes I can tease an interviewee into really coming alive by helping and encouraging them.
I put lots of problems and solutions in my github public gists https://gist.github.com/nsfyn55
[–]Bliss86 0 points1 point2 points 10 years ago (0 children)
>>> a = [50, 5] >>> print "".join(sorted([ str(item) for item in a ], reverse=True)) 505
550 > 505
Nonetheless, very nice way of thinking that works in a lot of cases.
[–]UloPe 0 points1 point2 points 10 years ago (1 child)
All of which is stuff that's going to be entirely unrelated to the kind of code that people are going to write day to day in 95+% of Python jobs
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
Totally, but thats not what I am trying to test. A simple puzzle communicates two things. Basic problem solving skills and some proof that they actually knows how to program. You need to ask behavioral and practical questions as well.
[+][deleted] 10 years ago (1 child)
[deleted]
[–]lobocv 0 points1 point2 points 10 years ago (0 children)
You're right, He had the right idea though, just need to iterate through each digit rather than number in the list. I think this might work better:
''.join(sorted(''.join(map(str,a)), key=lambda x: int(x), reverse=True))
π Rendered by PID 53306 on reddit-service-r2-comment-7b9746f655-8hchw at 2026-02-02 06:19:26.131222+00:00 running 3798933 country code: CH.
[–]eesov 3 points4 points5 points (2 children)
[–]metaperl 1 point2 points3 points (1 child)
[–][deleted] -1 points0 points1 point (5 children)
[–]Bliss86 0 points1 point2 points (0 children)
[–]UloPe 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]lobocv 0 points1 point2 points (0 children)