Created problem_39 in project_euler
diff --git a/project_euler/problem_39/__init__.py b/project_euler/problem_39/__init__.py
new file mode 100644
index 000000000000..792d6005489e
--- /dev/null
+++ b/project_euler/problem_39/__init__.py
@@ -0,0 +1 @@
+#
diff --git a/project_euler/problem_39/sol1.py b/project_euler/problem_39/sol1.py
new file mode 100644
index 000000000000..5c21d4beca8c
--- /dev/null
+++ b/project_euler/problem_39/sol1.py
@@ -0,0 +1,39 @@
+"""
+If p is the perimeter of a right angle triangle with integral length sides,
+{a,b,c}, there are exactly three solutions for p = 120.
+{20,48,52}, {24,45,51}, {30,40,50}
+
+For which value of p ≤ 1000, is the number of solutions maximised?
+"""
+
+from typing import Dict
+from collections import Counter
+
+
+def pythagorean_triple(max_perimeter: int) -> Dict:
+    """
+    Returns a dictionary with keys as the perimeter of a right angled triangle
+    and value as the number of corresponding triplets.
+    >>> pythagorean_triple(15)
+    Counter({12: 1})
+    >>> pythagorean_triple(40)
+    Counter({12: 1, 30: 1, 24: 1, 40: 1, 36: 1})
+    >>> pythagorean_triple(50)
+    Counter({12: 1, 30: 1, 24: 1, 40: 1, 36: 1, 48: 1})
+    """
+    triplets = Counter()
+    for base in range(1, max_perimeter + 1):
+        for perpendicular in range(base, max_perimeter + 1):
+            hypotenuse = (base * base + perpendicular * perpendicular) ** 0.5
+            if hypotenuse == int((hypotenuse)):
+                perimeter = int(base + perpendicular + hypotenuse)
+                if perimeter > max_perimeter:
+                    continue
+                else:
+                    triplets[perimeter] += 1
+    return triplets
+
+
+if __name__ == "__main__":
+    triplets = pythagorean_triple(1000)
+    print(f"{triplets.most_common()[0][0] = }")

### **Describe your change:**



* [x] Add an algorithm?
* [ ] Fix a bug or typo in an existing algorithm?
* [ ] Documentation change?

### **Checklist:**
* [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md).
* [x] This pull request is all my own work -- I have not plagiarized.
* [x] I know that pull requests will not be merged if they fail the automated tests.
* [x] This PR only changes one algorithm file.  To ease review, please open separate PRs for separate algorithms.
* [x] All new Python files are placed inside an existing directory.
* [x] All filenames are in all lowercase characters with no spaces or dashes.
* [x] All functions and variable names follow Python naming conventions.
* [x] All function parameters and return values are annotated with Python [type hints](https://docs.python.org/3/library/typing.html).
* [x] All functions have [doctests](https://docs.python.org/3/library/doctest.html) that pass the automated testing.
* [x] All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
* [x] If this pull request resolves one or more open issues then the commit message contains `Fixes: #{$ISSUE_NO}`.
