Computer Science

Input the string 'My School'. Write a script to partition the string at the occurrence of letter 'h'.

Python

Python String Manipulation

2 Likes

Answer

s = "My School"
print(s.partition('h'))

Output

('My Sc', 'h', 'ool')

Answered By

1 Like


Related Questions