Discuss / Python / 名字大小写

名字大小写

Topic source

def normalize(name):

    return name.title()

while True:

    n = input('请输入姓名(q或Q退出):')

    if n == 'q' or n == 'Q':

        break

    else:

        N = n.split()

        names = list(map(normalize,N))

        print(names)


  • 1

Reply