×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Matthew J_
Added: Jun 22, 2022 11:58 PM
Views: 2
Tags: no tags
  1. lst = [[1],[2],[3]]
  2. res = [item for sublist in lst for item in sublist]
  3.  
  4. print(res)      # [1, 2, 3]