Python 条件判断的使用

#!/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";
    

 

你可能感兴趣的:(Python 条件判断的使用)