flowers = [‘rose’,’lotus’,’lily’]
The above statement helps in creating a list.
There will be no output displayed.
flowers : variable name
[‘rose’,’lotus’,’lily’] : elements of the list
To print the elements we need to write print(flowers)
Then we will get the output : [‘rose’, ‘lotus’, ‘lily’]
To print the first element we need to write print(flowers[0])
Then we will get the output : rose
To print the second element we need to write print(flowers[1])
Then we will get the output : lotus
To print the third element we need to write print(flowers[2])
Then we will get the output : lily