from iteration_utilities import deepflatten
      
      flatten_list = list(deepflatten(original_list, depth=2))
      

      Python language logoFlatten a list

      Python public recipes

      Flatten a list using iteration_utilities

      Shortcut: list.deepflatten

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.