Explain Codes LogoExplain Codes Logo

Python

Python datetime to string without microsecond component

python
datetime
formatting
python-3.6

Controlling mouse with Python

python
mouse-control
scripting
automation

How to send email to multiple recipients using python smtplib?

python
email
smtplib
python-library

Converting between datetime, Timestamp and datetime64

python
pandas
datetime
timestamp

Count the number of occurrences of a character in a string

python
collections
functions
performance

Should I use 'has_key()' or 'in' on Python dicts?

python
prompt-engineering
best-practices
performance

Python 3: ImportError "No Module named Setuptools"

python
importerror
setuptools
pip

How do I do a case-insensitive string comparison?

python
case-insensitive-comparison
unicode-normalization
python-string-methods

Why is "except: pass" a bad programming practice?

python
exception-handling
best-practices
pythonic-code

How to get last items of a list in Python?

python
slice
negative-indexing
iterables

How to create a file name with the current date & time in Python?

python
time-module
datetime-module
file-system

How to print a dictionary's key?

python
dataframe
collections
best-practices

Relative paths in Python

python
pathlib
os-module
file-handling

Why use Abstract Base Classes in Python?

python
abstract-classes
method-signatures
type-hinting

How to get the seconds since epoch from the time + date output of gmtime()?

python
prompt-engineering
datetime
timestamp

Scatter plot with different text at each data point

python
matplotlib
scatter-plot
data-labeling

Relative imports in Python 3

python
relative-imports
package-structure
import-strategy

Python logging: use milliseconds in time format

python
logging
datetime
custom-formatter

Putting a simple if-then-else statement on one line

python
ternary-operator
code-readability
syntactic-sugar

Plot two histograms on single chart

python
histograms
matplotlib
data-visualization