%s、%d、'''、if .isdigit()的运用
作者:互联网
1 name = input("name:") 2 age = int(input("age:")) 3 job = input("job:") 4 gongzi = input("gongzi:") 5 if gongzi.isdigit(): 6 gongzi = int(gongzi) 7 8 msg = ''' 9 -----for %s info------ 10 name:%s 11 age:%d 12 job:%s 13 gongzi:%s 14 tuixiu:%s 15 ---------end---------- 16 '''%(name,name,age,job,gongzi,65-age) 17 print(msg)
标签:gongzi,name,int,age,job,isdigit,input,运用 来源: https://www.cnblogs.com/penn666/p/12075211.html