Solve problem "Replace within the fragment" online - Learn Python 3 - Snakify

Problem «Replace within the fragment» (Hard)


Statement

Given a string. Replace every occurrence of the letter h by the letter H, except for the first and the last ones.

In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
In the hole in the ground there lived a hobbit
In the Hole in tHe ground tHere lived a hobbit
qwertyhahsdhfghzxcvb
qwertyhaHsdHfghzxcvb
asdfghhzxcvb
asdfghhzxcvb
ahbhchdheha
ahbHcHdHeha
habcdefgijklmnh
habcdefgijklmnh
hh
hh
hah
hah
hhh
hHh
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
hHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHh
aHbhchdheha
aHbhcHdHeha