s = (
    """416d76b8811b0ddae2fdad8f4721ddbe|d4f656ee006e248f2f3a8a93a8aec5868788b927|12a5f648928f8e0b5376d2cc07de8e4cbf9f7ccbadb97d898373f85f0a75c47f"""
    )
md5sum, delim, rest = s.partition('|')
md5sum
How to display the first few characters of a string in Python?