# How to change output style of a cell (list data type)?

**URL:** <https://discourse.jupyter.org/t/how-to-change-output-style-of-a-cell-list-data-type/7738>\
**Category:** Notebook\
**Tags:** notebook\
**Created:** [February 1, 2021, 3:27am UTC](https://discourse.jupyter.org/t/how-to-change-output-style-of-a-cell-list-data-type/7738 "2021-02-01T03:27:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![duongn](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/duongn/32/3620_2.png) [@duongn](https://discourse.jupyter.org/u/duongn)\
**Post date:** [February 1, 2021, 3:27am UTC](https://discourse.jupyter.org/t/how-to-change-output-style-of-a-cell-list-data-type/7738/1 "2021-02-01T03:27:35Z")

</div>

I am working with `networkx`, how to do change the output of the cell showing the whole list from this

`EdgeDataView([('0', '1', {'Weight': 4}), ('0', '2', {'Weight': 3}), ('0', '3', {'Weight': 2}), ('0', '5', {'Weight': 6}), ('1', '3', {'Weight': 2}), ('1', '6', {'Weight': 5}), ('3', '4', {'Weight': 3}), ('5', '4', {'Weight': 1}), ('5', '8', {'Weight': 6}), ('4', '7', {'Weight': 2}), ('8', '9', {'Weight': 1})])`

to this ( each element of a list are separated by newline )

```auto
 [('0', '1', {'Weight': 4}),
 ('0', '2', {'Weight': 3}),
 ('0', '3', {'Weight': 2}),
 ('0', '5', {'Weight': 6}),
 ('1', '3', {'Weight': 2}),
 ('1', '6', {'Weight': 5}),
 ('3', '4', {'Weight': 3}),
 ('5', '4', {'Weight': 1}),
 ('5', '8', {'Weight': 6}),
 ('4', '7', {'Weight': 2}),
 ('8', '9', {'Weight': 1})]
```

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [February 2, 2021, 2:20am UTC](https://discourse.jupyter.org/t/how-to-change-output-style-of-a-cell-list-data-type/7738/2 "2021-02-02T02:20:28Z")

</div>

Have a look at [pprint](https://docs.python.org/3/library/pprint.html) (or this more [tutorial-style writeup](https://pymotw.com/2/pprint/)). You may need to pull the actual attribute. Good luck!
