Python- how to verify if a string ends with specific string?
<p>I have the following string for example:
'         <code>24499 ?   00:02:05 sys-yg-ys'</code></p>

<p>How can I verify if the string ends with a string which I got from a result of a function (e.g <code>sys-yg-ys</code>)?</p>

<p>I tried the following (just to check easy case) on the string above:
    result=''
    if (line.endswith('ys',len(line)-2,len(line)-1)):
            result='true'</p>

<p>but I didn't get true when I chech the value of result.</p>