python 下载好后怎么打开

各位朋友们,小编在这里要分享,python下载安装好后怎么打开 python3.8.2安装后怎么打开,一起探索吧!

在Python 2.x中,这是不保证的,因为可以重新分配True和FalsePython官网下载速度慢的问题分析与解决方案。但是,即使发生这种情况,布尔值True和布尔值False仍然正确返回以进行比较。

在Python 3.x中,True和False是关键字,并且始终等于1和0。

在Python 2和Python 3中的正常情况下:

False对象的类型是bool,它是int的子类:object

|

int

|

bool

这是示例中['zero', 'one'][False]起作用的唯一原因。它不适用于不是整数子类的对象,因为列表索引只适用于整数或定义^{}方法的对象(感谢mark-dickinson)。

编辑:There are two types of integers: [...] Integers (int) [...] Booleans (bool)

在布尔子区域中:Booleans: These represent the truth values False and True [...] Boolean values behave like the values 0 and 1, respectively, in almost all contexts, the exception being that when converted to a string, the strings "False" or "True" are returned, numeric contexts (for example when used as the argument to an arithmetic operator), they [False and True] behave like the integers 0 and 1, respectively.

因此,在Python2.6和3中,布尔值被显式地视为整数。

所以在Python 4出现之前你是安全的。;-)


原文地址1:https://blog.csdn.net/weixin_39784263/article/details/111012107
参考资料:python中用turtle画一个圆形 https://blog.csdn.net/SXIAOYAN_/article/details/140061099

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值