diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c08067d..9bc6992 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -28,20 +28,20 @@
- {
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "WebServerToolWindowFactoryState": "false",
- "last_opened_file_path": "/home/students/s473579/PycharmProjects/JezykiFormalne/Zajecie1/jezykiformalne",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "vue.rearranger.settings.migration": "true"
+
+}]]>
diff --git a/TaskD01/run.py b/TaskD01/run.py
new file mode 100644
index 0000000..38fcb59
--- /dev/null
+++ b/TaskD01/run.py
@@ -0,0 +1,21 @@
+import re
+import sys
+def write_answer(row, ouput_file):
+ with open(ouput_file, "a", encoding="utf-8") as file:
+ file.write(row)
+
+
+def find_hamlet(pattern, input_file, output_file):
+ with open(output_file, "w", encoding="utf-8") as output_file1:
+ with open(input_file, "r", encoding="utf-8") as file:
+ for row in file:
+ help_row = row.strip()
+ if re.search(pattern, help_row):
+ write_answer(row, output_file)
+
+pattern = re.compile(r'hamlet', re.IGNORECASE)
+# output_file ='simple.out'
+# input_file = 'simple.in'
+input_file = sys.argv[1]
+output_file = sys.argv[2]
+find_hamlet(pattern, input_file, output_file)
\ No newline at end of file
diff --git a/TaskD01/simple.out b/TaskD01/simple.out
new file mode 100644
index 0000000..8f93eae
--- /dev/null
+++ b/TaskD01/simple.out
@@ -0,0 +1,2 @@
+Here comes Hamlet
+Hamlet Hamlet again