newlist =  [e for e in initial_list if e == 1]
      Python language logo

      Filter elements in a list

      list
      Python public recipes

      Generic filter element in a list

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.