jazzy9498 jazzy9498
  • 14-09-2019
  • Computers and Technology
contestada

To copy a list you can use this. list2 = list1[ : ]

True or False

Respuesta :

ExieFansler ExieFansler
  • 19-09-2019

Answer:

True.

Explanation:

The colon in square brackets is used to subsetting the list.

for example list1=[1,2,4,6,2,5]

print(list1[3:5])

This will print 6 ,2

Because it means the list from index 3 to 4 the last value is not inclusive.So if you write [:] it means the whole list and in the question we are assigning it to list2.So all the values from list1 will be copied to list2.

Answer Link

Otras preguntas

A bag has index cards with the following numbers on them: 4, 11, 13, 25, 12, and 18. If an index card is drawn randomly , what is the probabilty that a composit
what percent of 126 is 22?
Which of the following factors does not favor a change in gene frequency and, therefore, evolution? (A) large populations (B) mutations (C) emigration (D) genet
If a+b=6 and a-b = 4, what is the value of 2a + 3b?
What is NAFTA? What countries are involved?
Which of the following stages of the cell cycle occurs immediately prior to mitosis? (A) G1 (B) G2 (C) S (D) M (E) cytokinesis Can you please explain with some
What is hyperbole? Please help
What would be m minus 4 in an algebraic expression
Which text exemplifies the anti-Victorianism prevalent in the early twentieth century? a) Eminent Victorians b) Jungle Books c) Philistine Victorians d) The
a swimming pool is 20 meters long and 12 meters wide the bottom of the pool is slanted so that the water depth is 1.3 at the shallow end and 4 meters deep at th