if check string python code example
Example 1: if type is string python
isinstance(s, str)
Example 2: determine how 2 string si equal py
from difflib import SequenceMatcher
def similar(a, b):
return SequenceMatcher(None, a, b).ratio()
isinstance(s, str)
from difflib import SequenceMatcher
def similar(a, b):
return SequenceMatcher(None, a, b).ratio()