CJCoding With Joseph
15free / daySign inCreate account

A Copy With A Slice

Make an independent copy of the list grades with a full slice (empty start and empty stop) and store it in copy. Set the first element of the copy to 0, then print the original list and the copy on separate lines; the original must still show 74 first, which proves the slice made a new list. No input is read.

Expected Output:

[74, 88, 91, 65, 79]
[0, 88, 91, 65, 79]

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
ListsSlicing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.