Python错误集锦:除法运算时提示ZeroDivisionError: division by zero-CSDN博客

网站介绍:文章浏览阅读7w次,点赞11次,收藏24次。原文链接:http://www.juzicode.com/archives/2669错误提示:进行除法运算时,提示ZeroDivisionError: division by zero#juzicode.com/vx:桔子codelst = [5,4,3,2,1,0]for l in lst: b = 10/l print('l=',l,'b=',b)l= 5 b= 2.0l= 4 b= 2.5l= 3 b= 3.3333333333333335l= 2 b= _zerodivisionerror: division by zero