小白求助
score的大于等于60 且小于等于70 在表达式中能不能直接写成“60<=score<=70” 完全可以 看什么语言,python中可以,c中则不行 BngThea 发表于 2017-12-28 08:03
看什么语言,python中可以,c中则不行
早啊 215330 发表于 2017-12-28 09:04
早啊
早!{:10_312:} 可以的 python是可以这样写 楼主,两种方式都行:
>>> s = '60<=score<=70'
>>> s
'60<=score<=70'
>>> print(s)
60<=score<=70
>>> s = 'score>=60 and score<=70'
>>> s
'score>=60 and score<=70'
>>> print(s)
score>=60 and score<=70
>>>
页:
[1]