All the code in this guide can be run using Google Colab. Google Colab is a cloud-based tool that allows us to run Python on the web easily. All you need to use Google Colab is a Google Account.
- Navigate to https://colab.research.google.com/. On the following screen, hit "New notebook".
2. In Google Colab, there are two types of content: text and code. In the top left corner, there are two buttons corresponding to each of these. Code boxes are where we will code in Python. Text boxes are optional and can be used to hold descriptions or explanations of the project/code.
3. Create your first code block by hitting the "Code +" button. In order to import JSON, HTML, or XML files in Google Colab, there are a few lines we must run aside from the import statement. These lines essentially allow us to access the JSON/XML/HTML file through Colab.
4. Once we run these lines of code, we have the option to upload a file. Once the desired file is uploaded, we can then create a new code block and use the libraries, code, and methods discussed in this guide to convert the file into a Python dictionary or list.