I have the following string for example: \' 24499 ? 00:02:05 sys-yg-ys\'
24499 ? 00:02:05 sys-yg-ys\'
How can I verify if the string ends with a string which I got from a
try this:
line = ' 24499 ? 00:02:05 sys-yg-ys' result = False print("Before test: " + str(result)) result = line.endswith('ys') print("After test: " + str(result))
output:
Before test: False After test: True
why you want to add 'start' and 'end' parameter?