Computer Science, asked by poojakumari25121986, 5 months ago

what will be the output of following python code?
flowers=['rose','lotus','lily']​

Answers

Answered by drharshita23
1

Answer:

there's no output code is wrong

Answered by dreamrob
0

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

Attachments:
Similar questions