def pattern_nine(strings):
    '''Pattern nine

        K
        A
        T
        H
        M
        A
        N
        D
        U
    '''

    def method_one(strings):
        if not str(strings).isalpha():
            strings = str(strings)

        for string in strings:
            print(string)

    def method_two(strings):
        join_word = '\n'.join(strings)
        print(join_word)

    print('Method One')
    method_one(strings)

    print('\nMethod Two')
    method_two(strings)


if __name__ == '__main__':
    try:
        pattern_nine('KATHMANDU')

    except NameError:
        print('String or Integer was expected')

def pattern_nine(strings):
    '''Pattern nine

        K
        A
        T
        H
        M
        A
        N
        D
        U
    '''

    def method_one(strings):
        if not str(strings).isalpha():
            strings = str(strings)

        for string in strings:
            print(string)

    def method_two(strings):
        join_word = '\n'.join(strings)
        print(join_word)

    print('Method One')
    method_one(strings)

    print('\nMethod Two')
    method_two(strings)


if __name__ == '__main__':
    try:
        pattern_nine('KATHMANDU')

    except NameError:
        print('String or Integer was expected')

Pattern nine          K         A         T         H         M         A         N         D         U