21) array Given a string S, print it after changing the middle element to * (if the length of the string is even, change the 2 middle elements to *). Sample Testcase : INPUT hello OUTPUT he*lo my code is
Created 3 years ago
753
Views
4
Comments
S = input()
m = str(len(S) // 2)
x = S.replace(m, "*")
print(x)
it is showing error.
kindly provide the correct syntax