# Looping to create new Branches with different data

**URL:** <https://root-forum.cern.ch/t/looping-to-create-new-branches-with-different-data/51044>\
**Category:** Newbie\
**Created:** [August 2, 2022, 2:16pm UTC](https://root-forum.cern.ch/t/looping-to-create-new-branches-with-different-data/51044 "2022-08-02T14:16:50Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [August 3, 2022, 11:52am UTC](https://root-forum.cern.ch/t/looping-to-create-new-branches-with-different-data/51044/4 "2022-08-03T11:52:04Z")

</div>

`array('i', [0])` is a 2-bytes signed integer so you need `"leafname/S"`

[array - Efficient arrays of numeric values](https://docs.python.org/3/library/array.html)

[TTree → Add a column (“branch”) holding fundamental types and arrays thereof](https://root.cern/doc/master/classTTree.html#addcolumnoffundamentaltypes)

---

_[View the full topic](https://root-forum.cern.ch/t/looping-to-create-new-branches-with-different-data/51044)._
