From bf20d2f3a0d24c18021fb1a37e23ab13c6facdec Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 28 Oct 2024 13:00:28 +0100 Subject: [PATCH] task3 dla simpple, brak danych dla polish_wiki --- TaskA03/task3.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 TaskA03/task3.py diff --git a/TaskA03/task3.py b/TaskA03/task3.py new file mode 100644 index 0000000..c94bc88 --- /dev/null +++ b/TaskA03/task3.py @@ -0,0 +1,10 @@ +with open("simple.in", encoding="utf-8") as f: + lines = f.readlines() + for line in lines: + line = line.strip() + line = line.split() + for i in range(len(line)-1): + if line[i][:2] == "19": + if 0 < int(line[i][3:4]) < 99: + if line[i+1][:2] == "r.": + print(" ".join(line)) \ No newline at end of file