3-4 Python的布尔类型

3-4 Python的布尔类型,第1张

概述  #Enteracodeprint(TrueandTrue)print(FalseandFalse)print(FalseandTrue)print(TrueandFalse)print(TrueandTrue)print("==============")print(TrueorTrue)print(TrueorFalse)print(FalseorTrue)print(FalseorFalse)pri

 

 

# Enter a codeprint(True and True )print(False and False )print(False and True)print(True and False)print(True and True)print("==============")print(True or True)print(True or False)print(False or True)print(False or False)print("==============")print(not True)print(not False)print("==============")a = 'python'print('hello', a or 'world')b = ''print('hello', b or 'world')

打印:

TrueFalseFalseFalseTrue==============TrueTrueTrueFalse==============FalseTrue==============('hello', 'python')('hello', 'world')

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

总结

以上是内存溢出为你收集整理的3-4 Python的布尔类型全部内容,希望文章能够帮你解决3-4 Python的布尔类型所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1188445.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存