def dict_print(d):
    """convert a dictionary to a string that can be print nicely

    Args:
        d (dictionary): the dictionary to be printed
    """

    def listToString(s):
        str1 = " "
        return str1.join(s)

    s = []
    counter = 0
    for key, value in d.items():
        counter += 1
        if counter < len(d):
            s.append(f"{key}: {value}; ")
        else:
            s.append(f"{key}: {value}")

    return listToString(s)