Indentation is important in Python. Remove the first space in the first line, and indent the code after else:
, on line 8 and 10.
More Related Contents:
- How to get all combination from two lists?
- How to create a zip archive of a directory?
- What’s the difference between a Python module and a Python package?
- How to print an exception in Python?
- What does numpy.random.seed(0) do?
- How can I find where Python is installed on Windows?
- Get current time in milliseconds in Python?
- Access Denied page with headless Chrome on Linux while headed Chrome works on windows using Selenium through Python
- Interleaving Lists in Python [duplicate]
- How can this function be rewritten to implement OrderedDict? [duplicate]
- Does a slicing operation give me a deep or shallow copy?
- What is the currently correct way to dynamically update plots in Jupyter/iPython?
- Process finished with exit code -1073741571
- Code completion not giving recommendations
- What is choice_set in this Django app tutorial?
- Tensorflow r1.0 : could not a find a version that satisfies the requirement tensorflow
- What is time complexity of a list to set conversion?
- Pygame Window not Responding after few seconds
- How to update/upgrade a package using pip?
- how to merge two data frames based on particular column in pandas python?
- Input and output numpy arrays to h5py
- Python/psycopg2 WHERE IN statement
- How can I get the current language in Django?
- Search for string allowing for one mismatch in any location of the string
- How to remove elements from XML using Python
- Python: How to drop a row whose particular column is empty/NaN?
- How to pass flag to gcc in Python setup.py script?
- Install mysqlclient for Django Python on Mac OS X Sierra
- Python: Random numbers into a list
- Apache Spark — Assign the result of UDF to multiple dataframe columns