Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

How do I use strip function in python?

'''
to use the split function, will have to ask the user for their email address, and we will
try to split the "@"
x = input("Email should contain @: ")
romeo = x.split('@')
print(romeo)
Comment

python strip()

a = "  smurf   "

a = a.strip()
#remove space at begining and end of string
print(a)
#smurf
Comment

python input().strip()

txt = "     banana     "
x = txt.strip()
print("of all fruits", x, "is my favorite")

txt = ",,,,,rrttgg.....banana....rrr"
x = txt.strip(",.grt")
print(x)
Comment

PREVIOUS NEXT
Code Example
Python :: loi normale python numpy 
Python :: python 4 release date 
Python :: python variable definieren 
Python :: find max value in 2d array python 
Python :: numpy sign method 
Python :: python : search file for string 
Python :: count substring in string python 
Python :: mro in python 
Python :: get category discord.py 
Python :: python launch prompt 
Python :: sns histplot change legend labels 
Python :: uninstall python kali linux 
Python :: how to move an item from one list to another python 
Python :: python if else interview questions 
Python :: python daemon 
Python :: adding in python 
Python :: time complexity of remove in python 
Python :: printing with format 
Python :: how to remove last element from a list python 
Python :: Mixed Fractions in python 
Python :: analyse des fleurs du mal la vision du baudelaire 
Python :: how to sort by date in .csv 
Python :: sklearn pipeline with interactions python 
Python :: renpy quickstart 
Python :: compter des valeur consecutives en python 
Shell :: restart audio ubuntu 
Shell :: conda statsmodels python 
Shell :: ubuntu install gimp 
Shell :: mvn clean install skip tests 
Shell :: Reset git local branch to remote branch 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =