<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_alt_length(self, individual=0):
 """Returns the number of basepairs of each alternative allele"""

        if isinstance(individual, str):
            individual = self.individuals[individual]
        return [len(self.alt[i-1].replace('.','')) for i in self.genotype[individual] if i > 0 and not self.alt[i-1].startswith('<')]