I've been using in
keyword to check if a character is available in a tuple and ran into a weird result. I'd appreciate if someone could explain the last result below. Thank you in advance.
>>> '' in ('n','p','')
True
>>> '' in ('n','p')
False
>>> '' in ('n')
True
Edit
As explained in Anthony's comment, it seems I've mistaken ('n')
- which is just a string in parenthesis - as a tuple. Using ('n',)
worked as expected.