From a5fe85bce5f7f921d017fa34a27dfaff8c1977ed Mon Sep 17 00:00:00 2001 From: swedge Date: Fri, 21 Feb 2020 16:00:15 -0500 Subject: [PATCH] Fixes #1 --- .../regex-substitution/regex-substitution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/regex-and-parsing/regex-substitution/regex-substitution.py b/python/regex-and-parsing/regex-substitution/regex-substitution.py index d3cf0cd..0fbdc58 100644 --- a/python/regex-and-parsing/regex-substitution/regex-substitution.py +++ b/python/regex-and-parsing/regex-substitution/regex-substitution.py @@ -1,4 +1,4 @@ -immport re +import re for _ in range(int(input())): - print(re.sub(r'(?<= )(\&\&|\|\|)(?= )', (lambda m: 'and' if m.group(1) == '&&' else 'or'), input())) \ No newline at end of file + print(re.sub(r'(?<= )(\&\&|\|\|)(?= )', (lambda m: 'and' if m.group(1) == '&&' else 'or'), input()))