What is correct syntax to create Python lists?

PythonServer Side ProgrammingProgramming

List is a collection of comma separated objects, not necessarily of same type, and put inside square brackets []. List object is mutable and an item can appear more than once in the collection.

>>> L1=["Raaj", 23, ["Phy", "Che", "maths"],8.5]
raja
Published on 30-Dec-2017 23:12:43
Advertisements