Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Use the python tag for all Python related questions. If you believe your question may be even more specific, you can include a version specific tag such as python-3.x.
6
votes
Accepted
Python Amazon Checkmate
Clunky methods can be the result of awkward setups. In your case, yes, you should have divided the problem up in smaller chunks. Your algorithm is so tightly bound to the current problem that
it'd b …
3
votes
Accepted
Telling the length of the highest common substring between 2 words
Instead of searching for the existence of the substring in the other string using a Python level loop, which is slow, take advantage of substring in string which does everything in C-loops under the hood … Your main program's exit condition will never be reached because input() in Python 3 always returns a string and as such a is None will always be false. …
2
votes
Accepted
Compute all valid configuration of eight queens on a 8x8 chess board
Coding style
Don't put a space between a function name and the opening bracket for its parameters. You should also consistently have a space after the comma between parameters in a function, iterable …