Explain Codes LogoExplain Codes Logo

Python

How to create new folder?

python
file-permissions
error-handling
folder-creation

How to create key or append an element to key?

python
dataframe
collections
best-practices

How to correct TypeError: Unicode-objects must be encoded before hashing?

python
hashing
encoding
security

How to copy a dictionary and only edit the copy

python
deep-copying
shallow-copying
mutable-objects

How to convert 'binary string' to normal string in Python3?

python
encoding
decoding
utf-8

How to convert a UTC datetime to a local datetime using only standard library?

python
datetime
timezone
utc

How to convert a string with comma-delimited items to a list in Python?

python
list-comprehension
string-manipulation
data-types

How to compute the similarity between two text documents?

python
text-processing
natural-language-processing
similarity-matrix

How to check whether a variable is a class or not?

python
type-checking
reflection
custom-inference

How to check if a variable is a dictionary in Python?

python
type-checking
pythonic-code
performance-optimization

How to check if a value exists in a dictionary?

python
dataframe
pandas
list-comprehensions

How to check if a user is logged in (how to properly use user.is_authenticated)?

python
login-check
django-authentication
view-functions

How to check if a specific key exists in a Python dictionary?

python
prompt-engineering
best-practices
collections

How to check for valid email address?

python
email-validation
regex-patterns
email-standards

How to calculate rolling / moving average using python + NumPy / SciPy?

python
numpy
scipy
dataframe

How to add property to a class dynamically?

python
metaprogramming
descriptors
properties

How to access a dictionary element in a Django template?

python
django-templates
dictionary-access
template-filters

How do you see the entire command history in interactive Python?

python
prompt-engineering
interactive-history
ipython

How do you run a Python script as a service in Windows?

python
service-management
windows-services
python-scripts

How do you decode Base64 data in Python?

python
base64-decoding
python-3.x
data-encoding