id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

String Operationsslice5

prev  |  next  |  chance

A slice is inclusive of the starting index and exclusive of the ending index.

def slice5(s):
    c = s[2:5]
    return c
Function Call  Return Value
slice5('Garage')
slice5('Track')
slice5('556843')
slice5('Elephant')
slice5('Violets')

Experiment with this code on Gitpod.io

⬅ Back