how to check prefix in python
string="enjoy every moment" result = string.startswith("en") #Output True result = string.startswith("in") # Output False
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: www.py4e.com