re.findall() where I want all unique instances of the regex on the page
问题 As the title suggests, I want to run code like this (top_url_list is just a list of urls I'm looping through to find instances of these filename conventions that I'm looking for with regex: name_files = [] for i in top_url_list: result = re.findall("\/([a-z]+[0-9][0-9]\W[a-z]+)", str(urlopen(i).read())) Where the objective is to grab all of the instances where the regex checks out, hence the 'findall()" function. The problem is, it's important that I only get distinct/uniques of each instance