Skip to content
CodeKruPro

Slicing a string

Predict the outputEasyPython onlyAsked in: Infosys, PhonePe, Wipro
main.py
s = "automation"
print(s[2:5])
print(s[-3:])
print(s[::-1])
print(s[::3])
print(s[0], s[-1])

Graded by exact match. Spaces at the ends of lines and blank lines at the end do not count.

to answer and keep your progress. Reading is free for everyone.