zoukankan      html  css  js  c++  java
  • Python-基本运算符

    # 01 比较运算符
    # > >=
    # < <=
    # ==
    # !=
    # print(10!=11)

    # 了解
    # x=None
    # # print(x == None)
    # # print(x is None)

    # l1=['abc',1,['a','b','c']]
    # l2=['abc','aa',]
    # print(l2 > l1)

    #02 逻辑运算符
    #and:连接左右两个条件,只有两个条件同时成立时and运算的结果为True
    # print(10 > 9 and 3 > 2 and 'egon' == 'egon' and True)

    #or:连接左右两个条件,两个条件成立任意一个or运算的结果就为True
    # print(False or False or True or False or 3 > 10)

    # res=(True or (False and True)) or ((False or True) and False)
    #res=(True or False) or (True and False)
    #res=True or False
    # print(res)

    #not
    # print(not 10 > 3)

    # x=None
    # print(not x is None)
    # print(x is not None)

    # age1=18
    # age2=19
    # print(age2 is not age1)

    #


    name_1='huangdong'
    pwd_1='123'
    name=input('please input your name:')
    pwd=input('please input your password:')
    if name == name_1 and pwd == pwd_1:
    print('login successfull')
    else:
    print('username or password error')
  • 相关阅读:
    vs 加入插件
    vs用法
    axios和vue用$refs属性获取dom
    错误演示
    vue表单的用法

    工作
    工作日报
    主机与虚拟机链接
    login
  • 原文地址:https://www.cnblogs.com/huangdong-/p/9983297.html
Copyright © 2011-2022 走看看