I have copied the following code with some alteration in naming to solve the problem as stated: Given a string s, return a string where all occurences of its first char have been changed to '*', except do not change the first char itself. e.g. 'babble' yields 'ba**le'. Assume that the string is length 1 or more. Here is the code: My question is when I pass "Lulla" why don't I see "Lu**a" returned in the interpreter as I think the code should do.
def fix_start(s):
start_letter = s[0]
rest_letters = s[1:]
rest_letters = rest_letters.replace(start_letter,'*')
return start_letter + rest_letters
print (fix_start ('Lulla'))