# Python JSON

**URL:** https://forum.networklessons.com/t/python-json/10828
**Category:** Lessons Discussion
**Created:** [April 20, 2020, 2:59pm UTC](https://forum.networklessons.com/t/python-json/10828 "2020-04-20T14:59:09Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![syncope988](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/syncope988/32/1385_2.png) [@syncope988](https://forum.networklessons.com/u/syncope988)
#### Post date: [November 25, 2020, 9:36pm UTC](https://forum.networklessons.com/t/python-json/10828/4 "2020-11-25T21:36:28Z")

</div>

Hi Rene and staff,  
you don’t talk about CSV with python, so may i ask a question about python with CSV format in this section ?  
Example 1: let’s python read a csv file

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/6/6e7ed8c20c38eef173c196c7808b3d0000d1bbc9.png)

Exemple1 is a string, then apply csv.reader(): you get an object “\_csv.reader” but this is not a loop object

Example 2: just open the csv file

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/3/3b7fca38dffcb4d037d37e89965ed2ef7e66347f.png)  
f is a \_io.TextIOWrapper object, then apply csv.reader(): you get an object “\_csv.reader” as well, but THIS IS a loop object

I don’t understand why in example 1, a “\_csv.reader” object is NOT a loop object, and in example 2, the same object (same class) is a loop object.  
So the same object seems to be not consistent as it comes from a string or a \_io.TextIOWrapper object.  
Could you help me ?  
Best regards

---

_[View the full topic](https://forum.networklessons.com/t/python-json/10828)._
