From 29b06049523894dc98773b828b20fe045a37d0e4 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Tue, 8 Dec 2020 06:36:24 +0100 Subject: [PATCH] [:] does the same and is minimally faster than .copy() --- day08.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day08.py b/day08.py index c9bee00..611c4f0 100644 --- a/day08.py +++ b/day08.py @@ -45,7 +45,7 @@ def part2(test_mode=False): if not check_command.startswith('nop') and not check_command.startswith('jmp'): continue - check_code = my_input.copy() + check_code = my_input[:] if check_command.startswith('nop'): check_code[counter] = check_code[counter].replace('nop', 'jmp')