tidy
This commit is contained in:
		
							
								
								
									
										2
									
								
								06/2.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								06/2.py
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
groups = open("input", "r").read().split("\n\n")
 | 
					groups = open("input", "r").read().split("\n\n")
 | 
				
			||||||
people = [[set(p) for p in g.split("\n") if p] for g in groups]
 | 
					people = [[set(p) for p in g.split("\n") if p] for g in groups]
 | 
				
			||||||
common = [p[0].intersection(*p) for p in people]
 | 
					common = [set.intersection(*p) for p in people]
 | 
				
			||||||
print(sum([len(c) for c in common]))
 | 
					print(sum([len(c) for c in common]))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user