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


Answer :-

s = input ("Enter a String :- ")
word = s.split("h")
print(word)

Output :-

Enter a String :- My School
['My Sc', 'ool']
>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post