how to pass arguments to filter function in python 1

how to pass arguments to filter function in python

filter(lambda seq: get_long(seq, 3),
       dna_list)

Here is what the above code is Doing:
1. We’re using the map function to apply the get_long function to each sequence in the dna_list.
2. We’re using the filter function to filter out any sequences that are less than 3 bases long.
3. We’re using the map function to apply the get_long function to each sequence in the dna_list.
4. We’re using the filter function to filter out any sequences that are less than 3 bases long.

Similar Posts