Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

string remove ,replace, length in python

text=input("enter the words:")
length=len(text)
check=text[-3:]
if length>=3:
    if check=="ing":
        check=check.replace('ing','ly')
        take=length-3
        print(text[:take]+check)
    else:
        print(text+'ing')
Comment

PREVIOUS NEXT
Code Example
Python :: plt grid linestyles options 
Python :: scipy.stats.spearmanr 
Python :: destructuring in for loops python 
Python :: truncate spaces in python 
Python :: importing a python file from another folder 
Python :: array slicing python 
Python :: how to loop through lines python 
Python :: pipeline model coefficients 
Python :: convert string ranges list python 
Python :: django admin text box 
Python :: python - subtracting dictionary values 
Python :: Python NumPy transpose Function Syntax 
Python :: get all subarrays of an array python 
Python :: beautifulsoup remove tag with class 
Python :: ski learn decision tree 
Python :: python string to lowercase 
Python :: aiohttp specify app IP 
Python :: update dataframe based on value from another dataframe 
Python :: python indent print 
Python :: ensemble model using voting classifier 
Python :: panda loc conditional 
Python :: python download images from unsplash 
Python :: rolling std dev of a pandas series 
Python :: histogram python 
Python :: logging python 
Python :: flask arguments in url 
Python :: add element to array list python 
Python :: migrations.RunPython 
Python :: concatenate strings of numpy array python 
Python :: como poner estado a un bot en discord 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =