Python Facts

All Snippets

Title Hits
List comprehensions 10239
Dictionary Defaults 6449
Filter 6260
Unzip 5964
dict() and zip() make for a powerful combination 3087
Triple quotes 8617
Map 8967
Parsing REST API 9082
Multiple return values 8369
Expanding arrays to function arguments 8566
Generate Incrementally unique Names 617
Collections 8339
Generator Functions 8106
Zip 8835
Ordered and Named Function Arguments 4971
Locals and strings 3948
Glass half empty? 35042
Change mutable lists using another name 276
Profiling is Easy 1711
Set Comprehensions 6212
Functions as objects 6131
Funception 6913
Addition made easy 6520
StringIO 5651
Reduce 2783
Mutability 1692
Reverse a string 8792
Get the last element in a list 6047
Time your code 5404
sum() for merging a list of lists 3793
Histogram 5130
Method Overloading 2600
Never Define One Line Functions 296
Encoding & Decoding 8551
Always pass tuples to string formatting 8631
Keyword arguments 4885
Count bits in a number 277
To be or not to be 3698
Number from Digits 2682
The Zen of Python 6309
Swap values 7653
Inspecting functions 38094
Bingo 5980
Working with dates 3824
String repetition 52404
String formatting using dictionaries 8193
Getting the single item out of a list/tuple/set 5792
Sets for finding unions and intersections 6431
Permissive functions 5745
Bools inherit from int 4739
Convert a binary number to an integer 34702
Filter out empty values from a list (or any other iterable) 8740
String translation tables 5716
Enumerating a list 41589
Summing up numbers 4503
namedtuple 277
Partial function 4978
getattr() 259
Skip the intermediate list 250
Palindrome 1739
Factorial function 37879
Square Roots 1709
List Comprehensions Support Conditionals 282
%d and %s can turn to the same thing 283
Dynamic inheritance 263
Start simple HTTP Server in seconds 352
Popping while iterating 296