Explain Codes LogoExplain Codes Logo

Python

How can I force division to be floating point? Division keeps rounding down to 0?

python
division
floating-point
integer-division

What's the pythonic way to use getters and setters?

python
best-practices
properties
pythonic-way

Printing Lists as Tabular Data

python
dataframe
pandas
pretty-printing

When to use cla(), clf() or close() for clearing a plot

python
plotting
memory-management
interactive-plotting

How to concatenate (join) items in a list to a single string

python
string-concatenation
list-manipulation
python-stdlib

Convert JSON string to dict using Python

python
json-loads
json-dumps
error-handling

Traverse a list in reverse order in Python

python
iterators
performance
best-practices

How to get current CPU and RAM usage in Python?

python
performance
multiprocessing
memory-usage

How to convert webpage into PDF by using Python

python
pdfkit
weasyprint
pypdf2

List of unique dictionaries

python
data-integrity
list-comprehension
numpy

How can I remove a trailing newline?

python
string-manipulation
rstrip
whitespace-characters

How do I delete items from a dictionary while iterating over it?

python
dictionary
comprehension
best-practices

Create list of single item repeated N times

python
list-comprehensions
performance-testing
memory-optimization

Convert Python dict into a dataframe

python
dataframe
pandas
data-orientation

Creating a range of dates in Python

python
dateutil
pandas
datetime

Find all files in a directory with extension .txt in Python

python
file-handling
directory-scan
glob

How to get HTTP headers in Flask?

python
flask
http-headers
best-practices

Python setup.py uninstall

python
pip
uninstall
manual-removal

Unicode (UTF-8) reading and writing to files in Python

python
unicode
utf-8
encoding

Can a variable number of arguments be passed to a function?

python
functions
best-practices
error-handling