fsimen

python challenge 4

Apr 29th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. import urllib.request
  2. nothing = '-50'
  3. url = 'http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=' (http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%27)
  4. L = []
  5. for i in range(-50,50,1):
  6.     response = urllib.request.urlopen(url+nothing)
  7.     html = response.read().decode('utf-8')
  8.     nothing = html.split()[-1:][0]
  9.     L.append(int(nothing))
  10. print(L)
Advertisement
Add Comment
Please, Sign In to add comment