Greetings, I'm Kiruthik from India. I've been studying coding for the past
two years. I know that strings are immutable in Python. But, most of the
people can't change the elements in the string as default. So, I came up
with a solution by creating a function called *strangelt. *This function
has three parameters in it and works faster. It has the ability to get a
string from the user and make changes to the element of the string using
index values. I found that it would be a pretty good solution for people's
problems. I hereby kindly request you to include this function in Python
built-in libraries from the release of the next version.

Expansion of strangelt: *str*ing+ch*ang*e+*el*ement
*Syntax:*
*string_variable=strangelt(string,index,new value to be replaced)*

Thank You,
Kiruthik.
def strangelt(s,j,m):
    l=[]
    for i in s:
        if(i==s[j]):
            i=m
        l.append(i)
    return(''.join(l))
def strangelt(s,j,m):
    l=[]
    for i in s:
        if(i==s[j]):
            i=m
        l.append(i)
    return(''.join(l))
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/DTJRUMDJLL5WLJZKMRKEE7OGAFZIIXFW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to