Python day04 赋值运算符与关系运算符
作者:互联网
赋值运算符
'''
赋值运算符
=
+=
-=
*=
/=
//=
**=
%
'''
关系运算符
'''
关系运算符 结果: True False
> < >= <= == != is
'''
a = 'abc'
b = 'bcd'
# 比较的是ascii对应的码值
print(a < b)
'''
练习: 输入华为手机价格,输入苹果手机价格,判断两个手机的价格是否相等
'''
huawei = 3260
apple = 5800
print(huawei == apple)
标签:关系,False,Python,day04,运算符,赋值 来源: https://blog.csdn.net/qq_35867245/article/details/123607692