2011-04-01, 11:45 PM
JPTheMonkey Wrote:Not understanding what they're saying. Just started Python in August as a school course. I dislike those database type things because they are hard for me to understand. Tried messing with the examples they had and am not getting what I need.
Or you could do this:
Code:
STEPPING = 7
lst = [x for x in range(40)] #Just setting up an example array
for x in range(0, len(lst), STEPPING):
if x + STEPPING > len(lst):
print(lst[x:])
else:
print(lst[x:(x+STEPPING+1)])