Needed to Use
main.py
# Online Python compiler (interpreter) to run Python online.
# Write Python 3 code in this online editor and run it.
# Get started with interactive Python!
# Supports Python Modules: builtins, math,pandas, scipy
# matplotlib.pyplot, numpy, operator, processing, pygal, random,
# re, string, time, turtle, urllib.request
import requests
import bs4
from bs4 import BeautifulSoup
URL = "<https://docs.google.com/document/d/e/2PACX-1vQGUck9HIFCyezsrBSnmENk5ieJuYwpt7YHYEzeNJkIb9OSDdx-ov2nRNReKQyey-cwJOoEKUhLmN9z/pub>"
def gridify(url):
res = requests.get(url)
html = res.text
soup = BeautifulSoup(html, 'html.parser')
table = soup.find("table")
rows = table.find_all("tr")
#grid = [[0 for _ in range(10)] for _ in range(10)]
points = {}
r=1
r_count = 0
c_count = 0
while r < len(rows):
data = rows[r].find_all("td")
y = int(data[0].find("span").text.strip())
if y > c_count: c_count = y
char = str(data[1].find("span").text.strip())
x = int(data[2].find("span").text.strip())
if x > r_count: r_count = x
#grid[x][y] = char
points[(x, y)] = char
r += 1
#r = len(grid)-1
#while r >= 0:
# print(grid[r])
# r -= 1
for y in reversed(range(r_count+1)):
row = ""
for x in range(c_count+1):
row += points.get((y, x), ".")
print(row)
gridify(URL)