Mar-13-2022, 10:14 PM
(This post was last modified: Mar-13-2022, 10:14 PM by menator01.
Edit Reason: Updated code
)
Might can do something like this
currentPath = ["EWR", "JFK", "SFO"] completedPaths = [] # completedPaths.append(currentPath.copy()) # or maybe completedPaths = completedPaths + currentPath print(completedPaths) currentPath.clear() print(currentPath) print(completedPaths)
Output:[['EWR', 'JFK', 'SFO']]
[]
[['EWR', 'JFK', 'SFO']]
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags