[Solved] print a underscores on the basis of number of chrcters in a string python


With this function you can produce your underscore string based on your word


def f(a):
    m = ''
    l = len(a)
    for i in range(l):
        m += '_'

    return m

4

solved print a underscores on the basis of number of chrcters in a string python