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

 

 

String Operationsslice1

prev  |  next  |  chance

The first character in a string is at index 0.

def slice1(s):
    c = s[0]
    return c
Function Call  Return Value
slice1('Car')
slice1('Truck')
slice1('55684')
slice1('Elephant')
slice1('Roses')

Experiment with this code on Gitpod.io

⬅ Back