Use calendar.isleap
:
import calendar
print(calendar.isleap(1900))
More Related Contents:
- What is Perl's equivalent of Python's time.time()? [closed]
- The letter ‘n’ is invalid syntax in Python? [closed]
- Python subprocess readlines() hangs
- “ssl module in Python is not available” when installing package with pip3
- How to specify multiple return types using type-hints
- Writing Unicode text to a text file?
- How can I convert radians to degrees with Python?
- Scraping Google Finance (BeautifulSoup)
- Grouping / clustering numbers in Python
- Extending list returns None [duplicate]
- Most efficient property to hash for numpy array
- How to use Win32 API with Python?
- Difference between exit(0) and exit(1) in Python
- Why can’t you add attributes to object in python? [duplicate]
- Spark union of multiple RDDs
- SSL: CERTIFICATE_VERIFY_FAILED with Python3
- Downloading and unzipping a .zip file without writing to disk
- Python Compilation/Interpretation Process
- Convolving image with kernel in Fourier domain
- Cancellable threading.Timer in Python
- How can I loop over entries in JSON?
- How to redirect stderr in Python?
- How to create a file name with the current date & time in Python?
- What’s the best solution for OpenID with Django? [closed]
- How can I create a full path to a file from parts (e.g. path to the folder, name and extension)?
- Can I somehow “compile” a python script to work on PC without Python installed?
- import matplotlib.pyplot hangs
- Django — Conditional Login Redirect
- Determine if an image exists within a larger image, and if so, find it, using Python
- FastAPI’s RedirectResponse doesn’t work as expected in Swagger UI