1.mysql查询语句后返回的数游标对象,必须强转list,才能遍历出所有的数据 self . csl . execute( 'select * from areas_2016' ) a = list ( self . csl) print (a) print ( len (a))