From 34fb274234d6f00ce1078a32201fd6d3d3ae8751 Mon Sep 17 00:00:00 2001 From: u68 <78559138+u68@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:18:24 +1300 Subject: [PATCH] Update main.py finally fixed this god damn thing --- main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 336fe18..10479ce 100644 --- a/main.py +++ b/main.py @@ -16,10 +16,12 @@ def extract_lines_before_pop_pc(file_path): def find_matching_strings(list1, list2, list3): result = [] + found = False for string1 in list1: match_info = '' - for string3 in list3: - for string2 in list2: + for string2 in list2: + found = False + for string3 in list3: if string1 in string2: fstring2 = string2.split(' ')[1] print(fstring2) @@ -27,10 +29,11 @@ def find_matching_strings(list1, list2, list3): extracted_chars = string3[33:39] formatted_chars = extracted_chars[3:5] + ' ' + extracted_chars[1:3] + ' ' + 'x' + extracted_chars[0] + ' xx' result.append(formatted_chars) + found = True break - break + if found: break else: - result.append(f"No match found for {string1}") + result.append(string1) return result def open_rop_file():