I need a function, that takes two arguments a (an integer) and b (either an integer or a list of integer), to return True if a == b or a in b.
This can be easily done by putting a simple or between the two conditions, but I wanted to know if it was possible to do it in a single condition.
I thought of doing:
- a in list(b)but it is not working because integers are not iterable,
- a in [b]but it is not working if- bis already a list.
 
     
     
     
    