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.
-2
votes
2
answers
131
views
memory-efficient & clean set() in python
I'm trying to get a list of unique colors (rgba values) in an image. Here are my attempts:
# 1 - too ugly and clunky
all_colors = []
for i in range(width):
for j in range(height):
…
1
vote
3
answers
115
views
DRY input-checking in python
Let's say I want to write a super simple Python program to ask a user for their personal information and list it back out in a "pretty" format.
def get_info():
first = input("enter your first name: …
5
votes
3
answers
1k
views
Caesar Cipher Encryption / Decryption in Python
I'm trying to write a Python program to predict the most likely substitution for a Caesar cipher. …