zoukankan      html  css  js  c++  java
  • 1-9 Python判断结构

     

    判断结构

    In [3]:
    tang=100
    if tang>200:
        print('OK')
    print('test')##有缩进就不在就不在if条件结构中
    
     
    test
    
    In [6]:
     tang=100
    if tang >200:
            print('200')
    elif tang<100:
            print('100')
    else:
        print('100-200')
    
     
    100-200
    
    In [7]:
    tang=50
    if tang>200:
        print('200')
    elif tang<100:
        print('100')
    else:
        print('100-200')
    
     
    100
    
    In [8]:
    tang=[123,456,789]
    if 123 in tang:
        print('OK')
    
     
    OK
    
    In [9]:
    tang={'tang':123,'yudi':456}
    if 'tang'in tang:
        print('ok')
    
     
    ok
    
  • 相关阅读:
    2014年7月 记事
    从客户端中检测到有潜在危险的Request.Form值 的解决方法
    jquery parent() parents() closest()区别
    不包含适合于入口点的静态"Main"方法
    JQuery移除事件
    jQ的toggle()方法示例
    codeforces hello2018 D Too Easy Problems
    HDU-6084 寻找母串
    51Nod 1109 01组成N的倍数
    可重排列
  • 原文地址:https://www.cnblogs.com/AI-robort/p/11636554.html
Copyright © 2011-2022 走看看