Lists and Tuples for Bioinformatics
Pitfalls
- Assignment does not copy:
alias = originalmakes both point to the same list. Useoriginal.copy()ororiginal[:]for an independent copy. append()vsextend():genes.append(["BRCA1", "TP53"])adds a list as one element;genes.extend(["BRCA1", "TP53"])adds two elements.sort()returnsNone: it modifies in place.sorted()returns a new list.- Tuples are immutable and hashable: use for fixed records (coo
[Description truncada. Veja o README completo no GitHub.]