logpuzzle/logpuzzle.py
def read_urls(filename):
  """Returns a list of the puzzle urls from the given log file,
  extracting the hostname from the filename itself.
  Screens out duplicate urls and returns the urls sorted into
  increasing order."""
  # +++your code here+++ [\w.-]+@[\w.-]+  alice-b@google.com
  underbar = filename.index('_')
  host = filename[underbar + 1:]

  urllist = []

  f = open(filename)

  for line in f:
      match = re.search(r'"GET (\S+)', line)
      if match:
          path = match.group(1)
          if 'puzzle' in path:
              urllist.append("http://"+host+path) 
              
  urllist = list(dict.fromkeys(urllist))
  
  url_new = sorted(urllist, key=url_sort_key)

  return url_new
Returns a list of the puzzle urls from the given log file,
  extracting the hostname from the filename itself.
  Screens out duplicate urls and returns the urls sorted into
  increasing order.
Returns a list of the puzzle urls from the given log file,
extracting the hostname from the filename itself.
Screens out duplicate urls and returns the urls sorted into
increasing order.
Returns a list of the puzzle urls from the given log file extracting the hostname from the filename itself . Screens out duplicate urls and returns the urls sorted into increasing order .
def read_urls(filename):
  underbar = filename.index('_')
  host = filename[underbar + 1:]
  urllist = []
  f = open(filename)
  for line in f:
      match = re.search(r'"GET (\S+)', line)
      if match:
          path = match.group(1)
          if 'puzzle' in path:
              urllist.append("http://"+host+path) 
  urllist = list(dict.fromkeys(urllist))
  url_new = sorted(urllist, key=url_sort_key)
  return url_new
def read_urls ( filename ) : underbar = filename . index ( '_' ) host = filename [ underbar + 1 : ] urllist = [ ] f = open ( filename ) for line in f : match = re . search ( r'"GET (\S+)' , line ) if match : path = match . group ( 1 ) if 'puzzle' in path : urllist . append ( "http://" + host + path ) urllist = list ( dict . fromkeys ( urllist ) ) url_new = sorted ( urllist , key = url_sort_key ) return url_new
Returns a list of the puzzle urls from the given log file,
extracting the hostname from the filename itself.
Returns a list of the puzzle urls from the given log file extracting the hostname from the filename itself .
"""Returns a list of the puzzle urls from the given log file,
  extracting the hostname from the filename itself.
  Screens out duplicate urls and returns the urls sorted into
  increasing order.""" # +++your code here+++ [\w.-]+@[\w.-]+  alice-b@google.com
filename