This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request, urllib.parse, urllib.error | |
import json | |
Sum=0 | |
count=0 | |
inp=input('Enter location:') | |
print('Retrieving ',inp) | |
uh = urllib.request.urlopen(inp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import urllib.parse | |
import urllib.error | |
from bs4 import BeautifulSoup | |
import ssl | |
import collections | |
collections.Callable = collections.abc.Callable | |
# Ignore SSL certificate errors | |
ctx = ssl.create_default_context() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
fh=open('week_1.txt') | |
l=list() | |
for digits in fh: | |
digits=digits.rstrip() | |
stuff=re.findall('[0-9]+',digits) | |
if len(stuff)>0: | |
l=l+stuff | |
sum=0 | |
for n in l: |