allysoftball531 allysoftball531
  • 07-01-2021
  • Computers and Technology
contestada

You already know about lists. What missing function will return the index of 7 in the list? >>> myList = [12, 5, 7, 3, 25] >>> myList. (7)

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 09-01-2021

Answer:

The index function

Explanation:

Required

What function is needed to complete the program

To return the index of an item in a list, we make use of the index function.

In this case, the complete program will be:

myList = [12, 5, 7, 3, 25]

print(myList.index(7))

At the end of program compilation and execution, the index of 7 (which is 2) will be returned/printed.

Answer Link
braferna
braferna braferna
  • 27-01-2022

Answer:

index

Explanation:

Answer Link

Otras preguntas

Anybody good at analogies?
Tickets for a school play cost $4 for adults and $2 per students. At the endof the play,the school sold 105 tickets and collected $360. -write a linear system
The Joneses are moving from San Francisco to South Africa. They pack their belongings in rectangular crates and hire a boxcar to ship the crates across land and
what is 4/5+11/12= ?
it takes 3 buckets of water to fill one third of a fish tank how many buckets are needed to fill whole tank
Why was Prince Shotoku's support for buddhism important?
What is a lunar eclipse?
The Joneses are moving from San Francisco to South Africa. They pack their belongings in rectangular crates and hire a boxcar to ship the crates across land and
What happens when a cold air mass meets a warm air mass that is not moving?
Which of the following reasons complete the proof in the picture below A.definition of complementary B.substitution property of equality C.definition of suppl