Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

copy something character ubntil a specific character in python

text = raw_input("Hello!, say marry")
left_text = text.partition("!")[0] 
#this partition funtion return three values i.e text.partition("!")[0] returns "hello" text.partition("!")[1] returns "!" and text.partition("!")[2] returns ", say marry"  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #copy #character #ubntil #specific #character #python
ADD COMMENT
Topic
Name
6+6 =