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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!