Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

prefix in python

line = 'Please have a nice day.'
print(line.startswith('Please'))        # Output: True
# Remember it is case-sensitive
print(line.startswith('p'))             # Output: False
Source by www.py4e.com #
 
PREVIOUS NEXT
Tagged: #prefix #python
ADD COMMENT
Topic
Name
2+1 =