KnowledgeBoat Logo

Computer Science

What are the various ways of creating a list?

Python List Manipulation

5 Likes

Answer

The various ways of creating a list are :

  1. Using Square Brackets [].
  2. Using the list() constructor.
  3. Using list comprehensions.
  4. Appending Elements.
  5. Using the extend() method.
  6. Using slicing.

Answered By

2 Likes


Related Questions