Advertisement
wrequiems

Untitled

Feb 28th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1.  
  2. def score(self, photo):
  3. common_tags = len(set(photo.tags).union(set(self.tags)))
  4. return min(len(self.no_tags) - common_tags, common_tags, photo.no_tags - common_tags)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement