【练习题】格式化打印

格式化打印

def print_format():
    name = input("Name:")
    age = input("Age:")
    salary = input("Salary:")
    msg = '''
    -------------info %s---------------
    Name : %s
    Age : %s
    Salary : %s
    ---------------end-----------------
    '''% (name,name,age,salary)
    print(msg)
原文地址:https://www.cnblogs.com/surenliu/p/12736558.html