摘要:
demo07_身份运算符 ''' @author: xilh @since: 20200124 ''' a = 20 b = 20 if ( a is b ): print("1 - a 和 b 有相同的标识") else: print("1 - a 和 b 没有相同的标识") if ( a is 阅读全文
摘要:
demo06_成员运算符 ''' @author: xilh @since: 20200124 ''' a = 10 b = 20 slist = [1, 2, 3, 4, 5 ]; if ( a in slist ): print("1 - 变量 a 在给定的列表中 slist 中") else: 阅读全文
摘要:
demo05_逻辑运算符 ''' @note: https://www.runoob.com/python/python-operators.html @author: xilh @since: 20200124 ''' a = 10 b = 20 if a and b : print("1 - 变 阅读全文
摘要:
demo04_位运算符 ''' @note: https://www.runoob.com/python/python-operators.html @author: xilh @since: 20200124 ''' a = 60 # 60 = 0011 1100 b = 13 # 13 = 00 阅读全文
摘要:
demo03_赋值运算符 ''' @note: https://www.runoob.com/python/python-operators.html @author: xilh @since: 20200124 ''' a = 21 b = 10 c = 0 c = a + b print("1. 阅读全文
摘要:
demo02_比较运算符 ''' @note: https://www.runoob.com/python/python-operators.html @author: xilh @since: 20200124 ''' a = 21 b = 10 c = 0 f = 'abc' g = 'abc' 阅读全文