How can I fix this lambda conditional?

前端 未结 0 449
误落风尘
误落风尘 2020-12-30 08:19

This is the code I\'m confused with:

starts_with_J = lambda x: True if x.startswith(\'J\' or \'1\') else False
print(starts_with_J(\'1Ji\'))

相关标签:
回答
  • 消灭零回复
提交回复
热议问题