I want to compare two strings in python ignoring some characters, like if the string is:
"http://localhost:13555/ChessBoard_x16_y20.bmp"
I want to ignore the values "16"
and "20"
in the string; no matter what these values are, if the rest of the string is same as this string is then I should get the result "TRUE"
. How can I do this?
Example:
URL = "http://localhost:13555/ChessBoard_x05_y12.bmp"
if URL == "http://localhost:13555/ChessBoard_x16_y16.bmp":
print("TRUE")
else:
print("FALSE")
Output:
TRUE