mirror of
https://gitlab.com/MisterBiggs/advent-of-code-2019.git
synced 2025-06-15 22:56:47 +00:00
cleaned code a little
This commit is contained in:
parent
b34018fdd6
commit
476a4ead06
@ -48,7 +48,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 32,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -59,10 +59,17 @@
|
||||
],
|
||||
"source": [
|
||||
"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",
|
||||
" print(fuel)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user