Answers for "hwo to check if a string endswith a number in python"

3

python string ends with

#!/usr/bin/python

str = "this is string example....wow!!!";

suffix = "wow!!!";
print str.endswith(suffix)
print str.endswith(suffix,20)

suffix = "is";
print str.endswith(suffix, 2, 4)
print str.endswith(suffix, 2, 6)
Posted by: Guest on March-28-2020
-1

how to check if string ends with specific characters in python

Text = "python is easy"
print(Text.endswith("easy"))
Posted by: Guest on October-12-2021

Code answers related to "hwo to check if a string endswith a number in python"

Python Answers by Framework

Browse Popular Code Answers by Language