SyntaxFix
Write A Post
Hire A Developer
Questions
if you want it without try and except then there is the solution
what you are trying to do is print 'hello' if 'harry' in a list then the solution is
'hello' if 'harry' in sam else ''