From 29fd86ae371367740ef314e272299530253ebc5f Mon Sep 17 00:00:00 2001 From: daviddoji Date: Wed, 6 Oct 2021 17:49:47 +0200 Subject: [PATCH] Fix path --- src/Python/Problem054.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Python/Problem054.py b/src/Python/Problem054.py index 1a1e6f3..f6004f1 100644 --- a/src/Python/Problem054.py +++ b/src/Python/Problem054.py @@ -9,6 +9,7 @@ Solution for problem 54 of Project Euler https://projecteuler.net/problem=54 """ +from pathlib import Path from utils import timeit @@ -115,7 +116,9 @@ def compute(): replace_map = {"T": 10, "J": 11, "Q": 12, "K": 13, "A": 14} score = [0, 0] - for line in open("../files/Problem54.txt", "r").read().splitlines(): + + file = Path("/datos/Scripts/Gitea/Project_Euler/src/files/Problem54.txt") + for line in open(file, "r").read().splitlines(): line = replace_values_in_string(line, replace_map).split() hands = line[:5], line[5:] for rank in (royal_flush, straight_flush, four_of_a_kind, full_house, flush,