Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 511 Bytes
QUESTION = 'Q: What does the code below the hash marks do?'
import quiz
quiz.show(question=QUESTION, py_file=__file__, is_code=True)
################################################################################
import urllib
import re
x = urllib.urlopen('http://python.org/download').read()
y,z = re.search(string=x,
pattern='(?s)The current production versions are.*?'
'Python (2\.\d+\.\d+).*?and.*?Python (3\.\d+\.\d+)').groups()
print("y: [%s]\nz: [%s]" % (y,z))