from pathlib import Path


def get_text(p: Path) -> str:
    """Return the contents from a single text file with newlines stripped."""
    with open(p, 'r') as file:
        data = file.read().replace('\n', '')
    return data