What is the difference between these two approaches?
import time
start_time = time.time()
node_to_visit = [4]
print("My program took", time.time() - start_time, "to run")
start_time = time.time()
node_to_visit = []
node_to_visit.append(4)
print("My program took", time.time() - start_time, "to run")
Output:
My program took 7.43865966796875e-05 to run
My program took 0.00012230873107910156 to run