fork download
  1. indexes_list = [(3, 2), (2, 2), (1, 2)]
  2. bb = ['0', '0', '0']
  3. b = [bb, bb, bb, bb]
  4.  
  5. for item in indexes_list:
  6. b[item[0]][item[1]] = '1'
  7.  
  8. print b
Success #stdin #stdout 0.02s 4676KB
stdin
Standard input is empty
stdout
[['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1'], ['0', '0', '1']]