pattern length and leftovers

workspace
km0 2 years ago
parent 3dede76608
commit c0523f86cb

@ -120,7 +120,7 @@ class Soup(Bureau):
length = len(list_a) + len(list_b) length = len(list_a) + len(list_b)
repeated_pattern = (self.pattern * (length // len(self.pattern)) repeated_pattern = (self.pattern * (length // len(self.pattern))
) + (length % len(self.pattern)) ) + self.pattern[:(length % len(self.pattern))]
for choice in repeated_pattern: for choice in repeated_pattern:
if choice == 'A': if choice == 'A':

Loading…
Cancel
Save