Module 4
Strings in more detail
Text is data you can measure and manipulate.
Text as data
In bioinformatics, text is not just words. DNA sequences, protein names, sample identifiers: all of these are text. Python calls text a string, and it gives you many tools to work with it.
Python
seq = "ATGC" print(seq) print(type(seq))
→ ATGC
<class 'str'>
The type() function tells you what kind of data something is. seq is a str, short for string.
What does type('hello') return?