📜  如果在 python 中使用和 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:57.126000             🧑  作者: Mango

代码示例1
#if using or / and
name='ron'
town='Tel Aviv'
age=25
if age>18 and town=='Tel Aviv':
  print(f'Name is {name} Age {age} and town is {town}\nusing and')
else:
  print('other')
  
#answer is: Name is Ron Age 25 and town is Tel Aviv
using and