mirror of
https://gitlab.com/MisterBiggs/advent-of-code-2019.git
synced 2025-06-16 15:17:15 +00:00
cleaned code a little
This commit is contained in:
parent
b34018fdd6
commit
476a4ead06
@ -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": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user