mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 02:13:15 +08:00
Pyupgrade to python3.8 (#3616)
* Upgrade to Python 3.8 syntax * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -41,7 +41,7 @@ def solution():
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
triangle = os.path.join(script_dir, "triangle.txt")
|
||||
|
||||
with open(triangle, "r") as f:
|
||||
with open(triangle) as f:
|
||||
triangle = f.readlines()
|
||||
|
||||
a = [[int(y) for y in x.rstrip("\r\n").split(" ")] for x in triangle]
|
||||
|
Reference in New Issue
Block a user