1 #!/usr/bin/env python 2 # Author: Andy Song 3 # date: 2020/6/25 4 # 占位符: %s: string, %d: digit, %f: float 5 6 name = input("Your Name Is: ") 7 gender = input("Your Gender Is: ") 8 age = int(input("Your Age Is: ")) 9 job = input("Your Job Is: ") 10 ID = int(input("Your ID Is: ")) 11 12 13 msg = ‘‘‘ 14 15 ------------------- Info of %s --------------------- 16 17 Name: %s 18 Gender: %s 19 Age: %d 20 Job: %s 21 ID: %d 22 23 ------------------- End ----------------------------- 24 25 ‘‘‘ %(name, name, gender, age, job, ID) 26 27 print(msg)
原文:https://www.cnblogs.com/andysongtech/p/13193501.html