Skip to main content
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
Results tagged with
Search options not deleted user 32408

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 3 palindrome checker

you can compare if the word is equal reversed version of it: return word == word[::-1] word[::-1] will reverse the word This is not only shorter to write, but also in interpreted languages like python … A simple loop in python is very slow compared to a simple loop in C. String comparison will use compiled C implementation instead of looping each letter in python's loop. …
Ski's user avatar
  • 255
1 vote
1 answer
359 views

Chaining a number of callables into a single function

How would you name this function (I gave in a name pipe in the example) which constructs combines a chain of functions with a single attribute into a single callable: # Python def pipe(*functions): …
2 votes

Numbers to Text Program - Python Training

I will review a single function the get_number(). From what I have seen in your code there is completely no benefit of passing messages as variables message1 and message2. It is easer to read code w …
Ski's user avatar
  • 255
2 votes
Accepted

CSV file cleanup

What is the purpose of those intermediate "output" csv files with a single column of name? I don't see the purpose of it. So I removed it: import csv FILES = [ 'dictionary/first_names.csv', …
Ski's user avatar
  • 255