Hi there 👋 I'm a New York City based web developer documenting my journey with React, React Native, and Python for all to see. Please follow my dev.to profile or my twitter for updates and feel free to reach out if you have questions. Thanks for your support!
One of the things I've found most helpful about Python so far is the error messages. Whenever your program crashes, you get a full traceback message of all the places in the code where the program failed.
If you scroll to the bottom of the traceback, you'll see the first place in the code it failed- which is the first bug it encountered that needs to be fixed. Python will also try to print out an exception that indicates what kind of bug it encountered.
my_list =  my_list = "apple" print(my_list) # console will print: # ERROR! # Traceback (most recent call last): # ... # IndexError: list assignment index out of range
This is because although the
my_list list exists, there is no index 0 on it, so in Python we cannot simply add something there if it doesn't exist.
If you like projects like this and want to stay up to date with more, check out my Twitter @stonestwebdev, I follow back! See you tomorrow for another project.