IQTLabs / hypothesis-bio

Hypothesis extension for computational biology
https://lab41.github.io/hypothesis-bio
Apache License 2.0
15 stars 2 forks source link

Generic wrapping function #46

Closed mbhall88 closed 4 years ago

mbhall88 commented 4 years ago

Create a generic function that takes a string s and an integer i and wraps s to maximum line length of i.

mbhall88 commented 4 years ago

I will create this in utilities.py

mbhall88 commented 4 years ago

This is not required actually. There is a package in the standard library called textwrap that does this.

import textwrap
textwrap.fill("ACGTACGTACA", 5)
# 'ACGTA\nCGTAC\nA'