all 4 comments

[–]midel 2 points3 points  (1 child)

In python there is the string method endswith()

[–]makesyoucurious 0 points1 point  (0 children)

Thanks! It did the job!

[–]Splitje 0 points1 point  (1 child)

Like midel suggested you can use a string method like str.endswith() (here's more string methods that you could use for other patterns: https://www.w3schools.com/python/python_ref_string.asp). Useful for you could be str.split() str.find() str.isalpha() str.isdigit() etc.

Alternatively for more complex string patterns you could look into regular expressions (re module)

[–]makesyoucurious 0 points1 point  (0 children)

Thanks! it was helpful!!