The problem was when you pass the ${compare} variable from robotframework to python function , it was going as unicode string
so the comaprison was some thing like this
([30, 40, 30], u’30’)
u’30’ was not going to be found in the list that is ${Value}.
so i have converted the string passed from robotframework to integer in your Python file and that should work now
def contain_number(arg1,arg2):
arg2=int(arg2)
if arg2 in arg1:
return True
else:
return arg1,arg2,False
solved List output are not getting recognize for custom library in robotframework when json library is used and list is mix with unicode character