Explain Codes LogoExplain Codes Logo

Python

Lists in ConfigParser

python
configparser
list-management
data-organization

List files ONLY in the current directory

python
file-system
pathlib
directory-listing

Json datetime between Python and JavaScript

python
datetime
json
serialization

Is there shorthand for returning a default value if None in Python?

python
prompt-engineering
best-practices
falsy-values

Is there a standardized method to swap two variables in Python?

python
tuple-unpacking
variable-swapping
python-optimization

Is there any way to do HTTP PUT request in Python?

python
requests
http-put
http-client

Is there a "not equal" operator in Python?

python
functions
best-practices
dataframe

Is there a library function for Root mean square error (RMSE) in python?

python
dataframe
pandas
mean-squared-error

Is there a label/goto in Python?

python
functions
recursion
exceptions

Is there a ceiling equivalent of // operator in Python?

python
functions
performance
best-practices

Issue with virtualenv - cannot activate

python
venv
virtualenv
python-versions

Is it possible only to declare a variable without assigning any value in Python?

python
type-hints
variable-annotations
best-practices

Is it not possible to define multiple constructors in Python?

python
parametric-polymorphism
keyword-arguments
class-methods

Is generator.next() visible in Python 3?

python
generator-engineering
lazy-computation
data-pipelines

Install a module using pip for specific python version

python
pip
python-versions
virtual-environments

In Python, how do you convert seconds since epoch to a `datetime` object?

python
datetime
timestamp
timezone

In Python, how do I split a string and keep the separators?

python
functions
list-comprehension
string-manipulation

In pytest, what is the use of conftest.py files?

python
fixture-engineering
test-preparation
best-practices

Initializing a list to a known number of elements in Python

python
list-initialization
memory-optimization
preinitialization

Initialise a list to a specific length in Python

python
list-comprehension
mutable-objects
list-initialization