Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b89d062

Browse files
committed
Use the complex() function where applicable
1 parent 7c83d50 commit b89d062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

2023/Day 10.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
" empty: set[complex] = {\n",
252252
" p\n",
253253
" for x, y in product(range(width), range(height))\n",
254-
" if (p := x + y * 1j) not in loop\n",
254+
" if (p := complex(x, y)) not in loop\n",
255255
" }\n",
256256
" total_area = 0\n",
257257
" while empty:\n",
@@ -358,7 +358,7 @@
358358
"name": "python",
359359
"nbconvert_exporter": "python",
360360
"pygments_lexer": "ipython3",
361-
"version": "3.12.0"
361+
"version": "3.12.1"
362362
}
363363
},
364364
"nbformat": 4,

0 commit comments

Comments
 (0)