Starting out With Python Ch.7 Checkpoint p.362

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What is the difference between calling a list's remove method and using the del statement to remove an element?

remove searches for an element and removes it, del deletes at a specific index.

How do you find the lowest and highest values in a file?

built in min and max functions

Describe the following list methods: index sort insert reverse

index: searches for an item in the list and returns the index of the first element where that item is insert: inserts an item into the list at a specific index sort: sorts the items in the list into ascending order reverse: reverses the order of items in the list.

Assume the following statement appears in a program. names = [] Which of the following statements would you use to add the string "Wendy" to the list at index 0? names[0] = 'Wendy' names.append("Wendy ")

the second one


संबंधित स्टडी सेट्स

American Yawp Chapters 21-26 (GREIVING)

View Set

WE THE PEOPLE InQuizitive Chpt 3

View Set