Question: Q: Write a script that appends 500,000 items to a an empty list, the item can be anything so the number 1 would do. Time
Q: Write a script that appends 500,000 items to a an empty list, the item can be anything so the number 1 would do. Time how long it takes (with a stop watch on the Internet or your phone). Write a script that prepends 500,000 items to an empty list and time how long it takes. DO NOT PRINT THE RESULT OR EACH VALUE ADDED TO THESE LISTS. Please clear your cell's output of the 500,000 items before handing in your assignment; scrolling through 500,000 items is a lot of work! What script takes longer and why? No more than 50 words. If either script runs for more than a minute, stop it and assume that it ran infinitely long
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
