第19 步:让我们更改classify_animal()中的最后一个if 语句,看看该动物是鲨鱼还是鳗鱼!
恒等运算符is另一种测试两个值是否相等的方法。
- 将 if 语句中的第一个字符串从"yes"更改为"shark" ,将第二个字符串从"y"更改为"eel" 。
- 然后,将 if 语句中的animal_class my_var "This is a string."去"fish" 。
- 让我们练习使用is !在您的最终 if 语句中,将两个出现的==更改为is 。
To navigate the page using the TAB key, first press ESC to exit the code editor.