04 2024 档案

摘要:非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 阅读(30) 评论(0) 推荐(0)
摘要:基本数据类型 number int money=6600 float discount=1.2 boolen isok=true isok=false string s='sssss' s="ssssss" ps:单引号与双引号成对出现,不可以混合使用 可以单引号嵌套双引号,互相嵌套 list(列表 阅读全文
posted @ 2024-04-16 22:45 writecodechangeworld 阅读(15) 评论(0) 推荐(0)