Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First: add underscore as necessary, then wrap solution in Clear category for Split Pairs by mccoy
from textwrap import wrap
def split_pairs(a):
return wrap(a + "_"*(len(a) % 2), 2) # append underscore if number of chars in a is uneven
July 24, 2021