Google Colab is the most widely used Python Notebook to quickly test your Python code snippets, if you have a use case where you want to upload a certain file say .csv, .json, or .txt, and wondering how to upload it so you can use it, then you can make use of files from google.colab module,
Example:from google.colab import files
uploaded = files.upload()
Choose File: sample-json-file.txt
(text/plain) - 358 bytes, last modified: n/a - 100% done
Saving sample-json-file.txt to sample-json-file.txt
When you execute this code snippet you will get the option to upload a file,

Now you can read the file and use it the way you want in your code!
import json
json_file = open("sample-json-file.txt", "r")
json_str = json_file.read()
json_obj = json.loads(json_str)
for element in json_obj:
print(element['name'])
print(element['age'])
print(element['city'])
print("-----------")
- Fetch More then 10 Links Per Page in Google Search Result
- Gmail Error Bad Request Your client has issued a malformed or illegal request
- Google Celebrates Rosa Bonheur 200th birthday with a Google Doodle
- Resolving DNS_PROBE_FINISHED_NXDOMAIN Google Chrome Error
- Google Search Console: HTTPS is invalid and might prevent it from being indexed
- 86 Gmail keyboard shortcuts that you may find Advantageous
- How to Subscribe to Google Nest Aware on iPhone
- Page actions are temporarily disabled [Google Search Console Page Crawling]
- How to Undo-Revert Sent Email in Google Gmail
- How to get nest aware on iPhone
- Google translate in spreadsheet
- Fetch as Google Crawl Error or Redirected Status
- Installing Google Cloud macOS SDK
- Google Local Guide Program and Perks of Contributing to Google Maps
- How to subscribe nest aware?
- Turning Off Chat in Gmail
- Find Nearest Gas Station using Google Map App on your Phone
- How to Upload a File to Google Colab (txt, csv, json, xml, xlsx)
- [Fix] reCAPTCHA not working in Web Browser
- How to remove disable google search blue triangle
- How to install Google Chrome using Mac Terminal
- Possible outages message Google Webmaster tool
- How to insert image into Google Sheets cell
- Fix: Cannot contact reCAPTCHA. Check your connection and try again.
- Google Webmaster : An error has occurred. Please try again later
- INSTALL_FAILED_INSUFFICIENT_STORAGE Android Error - Android
- Setting up RSS feeds notifications within Outlook - HowTos
- Fix SharePoint 2019 installation error This product requires Visual C++ Redistributable Package for Visual Studio 2017 - SharePoint
- Fix zsh: permission denied: script.sh - zsh
- How to change the tab color on Microsoft Excel on Mac - MacOS
- Fix - sudo: systemctl: command not found - Ubuntu
- Permanently set $PATH variable in Mac Zsh shell - MacOS
- [Android Studio] How to locate code for activity_main.xml - Android-Studio