Computer Science

Given is a Python string declaration:

voice = "Python for All Learners"

Write the output of:

print(voice[20 : : -2])

Python

Python String Manipulation

1 Like

Answer

Output
ere l o otP

Working

voice[20 : : -2]: Starting from index 20, the expression goes till the end of the string in reverse order with a step size of -2.

Answered By

1 Like


Related Questions