prints the first and last character and prints astrik in place of remaining characters

 prints the first and last character and prints astrik in place of remaining characters


    s=input()

    r=""

    for i in range(len(s)):

        if(i==0 or i==len(s)-1):

            r+=s[i]

        else:

            r+="*"

    print(r)

Comments