Computer Science, asked by ruanasri7, 2 months ago

Trace the output of the given code:
str=”we are super heroes”
print str[5:11]

Answers

Answered by allysia
1

Answer:

After a bit of correction:

\\\tt str="we\  are\ super\ heroes" \\\tt print (str[5:11])

It should be :

e supe

Answered by jai696
1

\huge{\mathtt{{\purple{\boxed{\tt{\pink{\red{A}\pink{n}\orange{s}\green{w}\blue{e}\purple{r᭄}}}}}}}}

'e supe'

\huge\blue{\mid{\fbox{\tt{Explanation}}\mid}}

str[5:11] slices the string from index 5 and stops at index 11

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions