Model.loops() — return a list of all loops

loops(aln, minlength, maxlength, insertion_ext, deletion_ext, include_termini=True)
This returns a list of all loops, by calling Model.get_insertions() and Model.get_deletions().

If include_termini is False, any residue range that includes a chain terminus is excluded from the output.
Example: See Selection() command.