HowTos
Free Video Tutorials
Written Tutorials
💲Paid Courses
Python Shell
Mailing List
About Us
Home/
Top Python How-To Questions
Install specific package versions with pip.
python
pip
package version
install
Check if a string is empty.
python
string
check
empty
Check if a string is a float.
python
check type
float
Know if an object has an attribute.
python
attributes
object
Manually raise an exception.
python
exception
raise
python-exception
Delete a file or folder.
python
directory
delete-file
file-io
Check if a given key already exists in a dictionary.
python
dictionary
dictionary-key
Check if a list is empty.
python
list
Check if a string contains a substring.
python
string
contains
substring
Check whether a file exists without exceptions.
python
file
file-exists
Schedule a Python script for execution at a specific time every day.
python
pythonanywhere
schedule python script
automatic execution
Extract items from two different lists into one list.
python
zip
lists
extract item
merge lists
Check if a text file is empty.
python
file
check if empty
Break a while loop.
python
break
while loop
Top Python What Questions
What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv?
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 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 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 is __init__.py used for?
python
module
package
python-packaging
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
What is the difference between a staticmethod and a classmethod in Python?
python
classmethod vs staticmethod
static method
instance method
class method
What is the best virtual environment for Python
python
virtual environment
venv
best
What is if __name__ == "__main__" in Python?
python
__main__
__name__==
Go to Top
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