1
0
mirror of https://gitlab.com/MisterBiggs/advent-of-code-2019.git synced 2025-06-16 07:06:40 +00:00

cleaned code a little

This commit is contained in:
Anson 2019-12-01 18:38:30 -07:00
parent b34018fdd6
commit 476a4ead06

View File

@ -48,7 +48,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 32, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -59,10 +59,17 @@
], ],
"source": [ "source": [
"with open(\"C:\\Coding\\Advent Of Code 2019\\Day 1\\input.txt\") as input:\n", "with open(\"C:\\Coding\\Advent Of Code 2019\\Day 1\\input.txt\") as input:\n",
" masses = list(map(int, input.read().split(\"\\n\")))\n", " masses = (map(int, input.read().split(\"\\n\")))\n",
" fuel = sum([mass // 3 - 2 for mass in masses])\n", " fuel = sum([mass // 3 - 2 for mass in masses])\n",
" print(fuel)" " print(fuel)"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
] ]
} }