标签:输出 git it! end name int style %s input
# -*- coding: utf-8 -*- # @Time : 2020/7/25 14:09 # @Author : Breeze # @FileName: 字符格式化输出.py name = input("Name:") age = int(input("Age:")) job = input("Job:") salary = input("Salary:") if salary.isdigit(): salary = int(salary) # else: # print("must input digit!") # exit() msg = ‘‘‘ -------- info of %s -------- Name: %s Age: %d Job: %s Salary: %f You will be retired in %s years! -------- end -------- ‘‘‘ %(name,name,age,job,salary,65-age) print(msg)
标签:输出 git it! end name int style %s input
原文地址:https://www.cnblogs.com/wxx123/p/13384844.html