You are on page 1of 3

EXP :

DATE :

AIM

ALGORITHM
OUTPUT
PROGRAM
S=(input("enter the string :"))
print(S)

STI=int(input("enter the starting index value :"))


SPI=int(input("enter the stopping index value :"))
print(S[STI:SPI])

print('the string after trim operation :')


print(S.strip('e'))
print(S.lstrip('e'))
print(S.rstrip('e'))

RESULT

You might also like