(daf)
return section
Transforms a daf string (e.g., '4b') to its corresponding stored section number.
Transforms a daf string (e.g., '4b') to its corresponding stored section number.
Transforms a daf string ( e . g . 4b ) to its corresponding stored section number .
def daf_to_section(daf):
    """
    Transforms a daf string (e.g., '4b') to its corresponding stored section number.
    """
    amud = daf[-1]
    daf = int(daf[:-1])
    section = daf * 2
    if amud == "a": section -= 1
    return section
def daf_to_section ( daf ) : amud = daf [ - 1 ] daf = int ( daf [ : - 1 ] ) section = daf * 2 if amud == "a" : section -= 1 return section