Python 条件判断的使用

原创
2014/02/13 10:04
阅读数 85
#!/usr/bin/python
#coding=gb2312 

if not 1:
    print('trues');
else:
    print('fuck');

bk='skc';    
if(bk=='skl'):
    print 'NOok';
elif(bk=='skc'):
    print 'OK!';
else:
    print 'fuck';
    
branch={'span':10,'jack':20,'black':30};
print (branch.get('span','Bad'));
print (branch.get('shit','Bad'));
if 'span' in branch:
    print "yes";
else:
    print "NO";
    

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部