I am trying to figure out how to append elements from the list into a pattern where I put them into the nested lists.
For example:
members = [1, 2, 3, 4, 5, 6, 7, 8, 9]
no_of_teams = int(input('no. of teams? '))
teams = [ [ ] for _ in range(no_of_teams)]
So that my output will end up looking like this:
no_of_teams? 2
teams = [ [1, 3, 5, 7, 9], [2, 4, 6, 8]]
if the user enters 3 then it will look like this:
teams = [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
and for 7 it looks like
teams = [ [1, 8], [2, 9], [3], [4], [5], [6], [7] ]