Python code for first two and last two charaters prints and remaining prints astrik
Python code for first two and last two charaters prints and remaining prints astrik s=input() r="" for i in range(len(s)): if(i==0 or i==1 or i==len(s)-1 or i==len(s)-2): r+=s[i] else: r+="*" print(r)