if-else with '|' operator - beginner's question/problem
lee.r2d2 at ntlworld.com
Wed Aug 8 19:25:31 CEST 2001
Hi there, I wonder if someone could possibly tell me what is wrong with
the following statement. I'm extremely embarrased to ask but here
>>> if (fname == 'a'|'e'|'i'|'o'|'u'):
Traceback (innermost last):
File "<pyshell#46>", line 1, in ?
if (fname == 'a'|'e'|'i'|'o'|'u'):
TypeError: bad operand type(s) for |
fname gives 'e'
Thanks very much in advance!
More information about the Python-list