Search for question
Question

Q2.3.5 Consider the following (incorrect) tests to see if the string 's' has one of two values. Explain how these statements are interpreted by Python and give a correct alternative. >>> s'eggs' >>>s('eggs' or 'ham') True >>> s = ('ham' or 'eggs') False

Fig: 1