user7077252 user7077252 - 1 year ago 67
Python Question

How do I generate a set of results from a for loop?

This is my code so far:

import numpy as np


for a in range(7):


I want to create a set of this results, named all_rows, but don't know how to do it.
Thank you very much.

Answer Source

Create a list and append a row to that list each time through your loop:

all_rows = []
for a in range(7):

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download