KnowledgeBoat Logo

Computer Science

Out of the following, what is correct syntax to copy one list into another?

  1. listA = listB[ ]
  2. listA = listB[:]
  3. listA = listB[ ]( )
  4. listA = list(listB)

Python List Manipulation

24 Likes

Answer

listA = listB[:]

listA = list(listB)

Answered By

8 Likes


Related Questions