fork(4) download
  1. data = [[1], [2, 3], [4, 5]]
  2. output = [element for each_list in data
  3. if len(each_list) == 2
  4. for element in each_list
  5. if element != 5]
  6. print(output)
  7. # Out: [2, 3, 4]
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
[2, 3, 4]