Printing a list using python

前端 未结 4 462
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 21:27

I have a list compiled from excel cells, using python - say listlist. Each element in the cell/list is in unicode. When I print the list as

pri         


        
4条回答
  •  忘掉有多难
    2020-12-11 22:17

    When printing the list, it shows each object within the list using the object's __repr__

    When printing the object alone, it uses the object's __str__

提交回复
热议问题