Ethan C.
asked 05/21/21Print the 1st element, the 5th element, and the 50th element in list2-integers from 0 to 100
1 Expert Answer

Patrick B. answered 05/22/21
Math and computer tutor/teacher
def list101():
list = []
for i in range(102):
list.append(i)
return(list)
###################################
list2 = list101()
list2.remove(10)
list2.remove(50)
list2.remove(80)
print(" list2 now has length " + str(len(list2)))
print(list2)
list2 = list101()
list2.pop(0)
list2.pop(4)
list2.pop(48)
print(" list2 now has length " + str(len(list2)))
print(list2)
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Ethan C.
List2 code: list2 = [] for i in range(101): list2.append(i) print(list2)05/21/21