摘要: 非0整数(正数、负数)进行bool转换,均为true。0的强制类型转换为bool为false bool强制类型,如果为float转bool,如果a!=0.0,则为true,否则为true;如果为str转bool,若str='',str中为空,则bool(str)的内容为false,否则为true,空 阅读全文
posted @ 2024-04-17 18:13 writecodechangeworld 阅读(23) 评论(0) 推荐(0)