pop from copy
This commit is contained in:
parent
ef08f0d23a
commit
bb15842353
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import copy
|
||||
|
||||
test = (""" [D]
|
||||
[N] [C]
|
||||
|
@ -38,7 +39,8 @@ def rearrange_stacks( input ):
|
|||
return stack
|
||||
|
||||
def read_stacks_top( stacks ):
|
||||
top = list(map(list.pop, stacks))
|
||||
stacks_c = copy.deepcopy(stacks)
|
||||
top = list(map(list.pop, stacks_c))
|
||||
print("".join(top))
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import copy
|
||||
|
||||
test = (""" [D]
|
||||
[N] [C]
|
||||
|
@ -38,7 +39,8 @@ def rearrange_stacks( input ):
|
|||
return stack
|
||||
|
||||
def read_stacks_top( stacks ):
|
||||
top = list(map(list.pop, stacks))
|
||||
stacks_c = copy.deepcopy(stacks)
|
||||
top = list(map(list.pop, stacks_c))
|
||||
print("".join(top))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue