what will be the output of following python code?
flowers=['rose','lotus','lily']
Answers
Answered by
1
Answer:
there's no output code is wrong
Answered by
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
English,
2 months ago
Physics,
2 months ago
Social Sciences,
5 months ago
Science,
11 months ago
Math,
11 months ago