Fixed spliting at spaces issue
This commit is contained in:
@@ -12,18 +12,17 @@ import sys
|
||||
# to imported and invoked from other python scripts
|
||||
def main():
|
||||
|
||||
sounds: list[str] = sys.stdin.readline().strip().split(" ")
|
||||
sounds: list[str] = sys.stdin.readline().strip().split()
|
||||
num_animals: int = int(sys.stdin.readline().strip())
|
||||
|
||||
fox_sounds: list[str] = []
|
||||
animals_ecountered: list[str] = []
|
||||
|
||||
animal_sounds: list[tuple[str, str]] = list(
|
||||
map(
|
||||
lambda line: line.strip().split(" goes "),
|
||||
sys.stdin.readlines()[:num_animals],
|
||||
)
|
||||
)
|
||||
animal_sounds: list[tuple[str, str]] = []
|
||||
|
||||
for line in sys.stdin.readlines()[:num_animals]:
|
||||
split_line = line.strip().split(" goes ")
|
||||
animal_sounds.append((split_line[0], split_line[1]))
|
||||
|
||||
for sound in sounds:
|
||||
animal_found = False
|
||||
|
||||
Reference in New Issue
Block a user