Write the output for the following on he basis of the List provided L=[1,'c','a','t',5,['c','o','w','s'],3,'h','e','n'] print(L[-6:-9])
1)['c','o','w','s']
2)[ ]
3)['w','o','c'
4)[5,'t','a']
5)Other:______
Answers
Answered by
0
Explanation:
> print(L[2:5]) will return the items from position 2 to 5. -> Remember that the first item is at position 0, and note that the item in position 5 is NOT included. So, the output will be [6,82,5]Read more on Sarthaks.com - https://www.sarthaks.com/968777/given-the-lists-l-1-3-6-82-5-7-11-92-write-the-output-of-print-l-2-5
Similar questions