You still have to call the function.
def main(): # declaring a function just declares it - the code doesn't run
print("boo")
main() # here we call the function
More Related Contents:
- Converting for loops into while loop [closed]
- Fitting empirical distribution to theoretical ones with Scipy (Python)?
- Nested defaultdict of defaultdict
- Catch a thread’s exception in the caller thread?
- Shuffle DataFrame rows
- Django CSRF Cookie Not Set
- Windows- Pyinstaller Error “failed to execute script ” When App Clicked
- How do I continuously trigger an action at certain time intervals? Enemy shoots constant beam instead of bullets in pygame [duplicate]
- How to drop duplicates based on two or more subsets criteria in Pandas data-frame
- partial string formatting
- Installing Python 3 on RHEL
- pip install dependency links
- PySide / PyQt detect if user trying to close window
- In Pandas, does .iloc method give a copy or view?
- RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility
- Plotting directed graphs in Python in a way that show all edges separately
- pythoncom crashes on KeyDown when used hooked to certain applications
- How do I convert an OpenCV image (BGR and BGRA) to a pygame.Surface object
- Why are frequency values rounded in signal using FFT?
- Python not equal operator
- pysqlite: Placeholder substitution for column or table names?
- How do you create a Button on a tkinter Canvas?
- How to return a custom Response when a Header is absent from the Request using FastAPI?
- How to easily share a sample dataframe using df.to_dict()
- “SyntaxError: Non-ASCII character …” or “SyntaxError: Non-UTF-8 code starting with …” trying to use non-ASCII text in a Python script
- How do I call a function twice or more times consecutively?
- How to solve “AttributeError: module ‘google.protobuf.descriptor’ has no attribute ‘_internal_create_key”?
- Import Python module from memory [duplicate]
- Using openpyxl to read file from memory
- Numpy.Array in Python list?