আমরা নিচের কোড ব্যবহার করে দিয়ে गये স্ট্রিংগুলো কম্পেয়ার করতে পারি
উদাহরণ
import re
s1 = 'Pink Forest'
s2 = 'Pink Forrest'
if bool(re.search(s1,s2))==True:
print 'Strings match'
else:
print 'Strings do not match'
আউটপুট
এটি আউটপুট দেবে
Strings do not match