HowTos
Free Video Tutorials
Written Tutorials
đź’˛Paid Courses
Python Shell
Mailing List
About Us
Home
Python What Questions
What is the Python 3 equivalent of “python -m SimpleHTTPServer”
python3
python -m SimpleHTTPServer
Why do Python classes inherit 'object'?
python
inheritance
object-class
What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?
python
venv
virtualenv
pipenv
What ipython
pyenv
virtualenvwrapper
pyvenv
What is the meaning of single and double underscore before an object name?
python
double-underscore
single-underscore
What's the canonical way to check a type in Python?
python
canonical
check-type
What is the proper way to declare custom exceptions in modern Python?
python
custom-exeptions
declare
What can I use as a replacement for the switch statement in Python?
python
replace
switch statement
How to add an existing venv virtual environment in PyCharm
venv
pycharm
What to do to import files from a different folder in Python?
python
python-import
importerror
Why is it string.join(list) instead of list.join(string)?
python
string
list
Why is reading lines from stdin much slower in C++ than Python?
python
readlines
c++
Is there a way to run Python on Android?
python
android
android-scripting
Are static class variables possible in Python?
python
oop
class-variables
static
class
What makes the “1000000000000000 in range(1000000000000001)” so fast in Python 3?
range
python-3
python-internals
python performance
What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
parameter-passing
python syntax
argument-unpacking
variadic-functions
What is __init__.py used for?
python
module
package
python-packaging
“Least Astonishment” and the Mutable Default Argument in Python
python
language-design
default-parameters
least-astonishment
What is the difference between __str__ and __repr__ in Python?
python
repr
magic-methods
str
What is the difference between Python's list methods append and extend?
python
list
append
extend
data-structures
What are metaclasses in Python?
python
oop
metaclass
python-class
python-datamodel
Does Python have a ternary conditional operator?
python
operators
conditional-operator
ternary-operator
Python Classes and OOP Explained
oop
object oriented programming
classes
Should I use a for-loop or a list comprehension in Python?
python
list comprehension
comparing
for-loop
faster
What is the difference between a staticmethod and a classmethod in Python?
python
classmethod vs staticmethod
static method
instance method
class method
What does "yield" do in a Python function?
python
yield
generator
What is the best virtual environment for Python?
python
virtual environment
venv
best
What is if __name__ == "__main__" in Python?
python
__main__
__name__==
Become a Patron
Do you like my work and would want to contribute? You can become a patron on my Patreon below!
Become a Patron