Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Questions tagged [python]
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.
This takes an array of numbers then splits it into all possible combinations of the number array of size 4 then in another array puts the leftovers. As I want to take the difference in averages of ...
Mar 3, 2011 at 16:05
Mar 3, 2011 at 14:23
Here's what I've right now:
Feb 28, 2011 at 3:43
I'm trying to port this little F# snippet while staying pythonic:
Feb 25, 2011 at 23:44
I am writing an application aimed at the desktop but using web technologies. It will have an HTML interface and a server written in Python using Flask will do all of the filesystem interaction. It ...
Feb 25, 2011 at 20:44
I need to parse an invalid JSON string in which I find many repetitions of the same key, like the following snippet:
Feb 24, 2011 at 13:03
I wrote as an exercise in Test-Driven Development a piece of Python code that contains two functions:
roman2dec(roman), that converts a roman number (string) into ...
Feb 21, 2011 at 16:54
I'm trying to apply
string.strip() to all the leafs that are strings in a multidimensional collection, but my Python is a bit rusty (to say the least). The ...
Feb 18, 2011 at 2:52
I have a function that takes a column title, and a response.body from a urllib GET (I already know the body contains text/csv), and iterates through the data to build a list of values to be returned. ...
Feb 16, 2011 at 19:08
I am primarily a Python programmer and have finally ditched the IDE in favour of vim and I will admit, I am loving it !
vimrc file looks like this:
Feb 16, 2011 at 17:48
I had a question about using the modulus operator in Python and whether I have used it in a understandable way.
This is how I've written the script:
Feb 15, 2011 at 22:37
Below are two solutions to the FizzBuzz problem in Python. Which one of these is more "Pythonic" and why is it more "Pythonic" than the other?
Feb 13, 2011 at 22:06
I haven't had anyone help me out with code review, etc, so I thought I'd post a Python class I put together for interfacing with Telnet to get information from a memcached server.
Feb 6, 2011 at 1:42
Is there a better (more pythonic?) way to filter a list on attributes or methods of objects than relying on lamda functions?
Feb 1, 2011 at 22:44
I need a code review for best practices and code correctness of the following piece of code.
run executes a program and validates in output. If the output is valid ...
Feb 1, 2011 at 13:25
Please review this:
Feb 1, 2011 at 4:39
Can I make my template syntax simpler? I'm hoping to eliminate the
if and maybe also the for block.
This worked in the shell ...
Jan 30, 2011 at 1:57
Here is the skeleton of my (first!) Django app:
Jan 28, 2011 at 14:08
It's clever, but makes me vomit a little:
file = '0123456789abcdef123'
path = os.sep.join([ file[ x:(x+2) ] for x in range(0,5,2) ])
Jan 28, 2011 at 1:28
The requirements for this one were (original SO question):
Generate a random-ish sequence of items.
Sequence should have each item N times.
Sequence shouldn't have serial runs longer than a given ...
Jan 25, 2011 at 23:41
This is part from an answer to a Stack Overflow question. The OP needed a way to perform calculations on samples from a population, but was hitting memory errors due to keeping samples in memory.
Jan 25, 2011 at 23:27
I'm learning Django as I go. I know this model is missing user authentication, registration, comments/comment threading, and voting. But this is my starting code for my model. What are some of the ...
Jan 24, 2011 at 22:35
This is a function I wrote yesterday and have tested with lots of input. It's been committed and is in use, but no review was done, so it seems like a good candidate for Code Review: it could be more ...
Jan 21, 2011 at 20:09
I started programming with Java and C++, so I'm used to having a 'main' function that calls other functions that do the actual work. At university I was always told that doing actual computation in ...
Jan 19, 2011 at 21:16
I'd like suggestions for optimizing this brute force solution to problem 1. The algorithm currently checks every integer between 3 and 1000. I'd like to cut as many unnecessary calls to ...
Jan 19, 2011 at 21:04
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only