Untitled

mail@pastecode.io avatar
unknown
python
a month ago
563 B
1
Indexable
Never
# Initialize an empty string to store the formatted protein sequence
formatted_protein = ""

# Iterate over the protein sequence in chunks of 70 characters
for i in range(0, len(protein), 70):
    # Add the current chunk of 70 characters to the formatted protein sequence,
    # appending a newline character after each chunk
    formatted_protein += protein[i:i+70] + '\n'

# Join the formatted chunks into a single string with newline characters
formatted_protein = '\n'.join(formatted_protein)

# Display the formatted protein sequence
print(formatted_protein)
Leave a Comment