I want to compare one variable value which is a string with an another string value in a IF statement using a python code.
Expectation:
Variable Name and Value:: v1='purchased' String Value:: string='purchase'
If both (v1 and string) are not equal then,
print "Both strings are not equal".
Outcome:
v1 = 'purchased'
if (v1 not like 'pur%') or (v1 != 'ordered'):
print("Both strings are not equal", v1) # return if true
else:
print("Both strings are equal", v1) # return if false
Scenario 1: While passing v1 as "purchase" getting "Both strings are not equal". It should give me "Both strings are equal". As I am trying to match it partially.
Scenario 2: When giving "ordered" it is giving same "Both strings are not equal". It should give me "Both strings are equal".