python中布尔值_Python中的布尔值

python中布尔值

 What is Boolean?

  什么是 布尔值?

It is just an integer that can have 1 ,0,-1 or floats like 0.32, 3.32 etc. The output of the decisions can be true or false. 

它只是一个整数,可以具有1,0,-1或浮点数,例如0.32、3.32等。决策的输出可以为true或false。

In many cases during writing code or implementing any comparison to consider any decision we usually use boolean in any programming language. 

在许多情况下,在编写代码或进行任何比较以考虑任何决定时,我们通常在任何编程语言中都使用布尔值。

Here we will see some basic examples on how we can use them on Python.  Before we use it let us see the type of True and False. 

在这里,我们将看到一些有关如何在Python上使用它们的基本示例。 在使用它之前,让我们看一下True和False的类型。

print type(True) 
print type(False) 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值