Explain Codes LogoExplain Codes Logo

Python

Proper indentation for multiline strings?

python
multiline-strings
readability
docstrings

Determine the type of an object?

python
type-checking
duck-typing
best-practices

How to recursively find files in Python

python
pathlib
os-walk
file-search

Disable output buffering

python
output-buffering
sys-module
subprocess

How do I get the last element of a list?

python
negative-indexing
list-manipulation
functions

Converting Dictionary to List?

python
list-comprehension
memory-management
dictionary-comprehensions

Finding the average of a list

python
performance
statistics
numpy

Why does "return list.sort()" return None, not the list?

python
list-sort
method-chaining
timsort

How to print without a newline or space

python
printing
string-formatting
buffering

How do I print colored text to the terminal?

python
colorama
curses
terminal-ui

How to uninstall Python 2.7 on a Mac OS X 10.6.4?

python
uninstall
macos
dependencies

How can I replace (or strip) an extension from a filename in Python?

python
file-handling
pathlib
extensions

How do I change the size of figures drawn with Matplotlib?

python
matplotlib
data-visualization
pandas

How to Check if One of the Following Items Is in a List?

python
sets
any
generator-expressions

How to check Django version

python
django
version-check
virtual-environment

How can I make a Python script standalone executable to run without ANY dependency?

python
packaging
pyinstaller
cross-platform

Importing files from different folder

python
sys-path
absolute-imports
best-practices

How do I split the definition of a long string over multiple lines?

python
string-management
best-practices
sql-injection

Savefig outputs blank image

python
matplotlib
data-visualization
subplots

Speed comparison with Project Euler: C vs Python vs Erlang vs Haskell

python
performance
optimization
memory-management