def generateSparksList(numberOfPS): psList = [] i = 0 while i < numberOfPS: sparks = particles.createSparks() if sparks != None: psList.append(sparks) i = i + 1 return psList