Python 格式化输出
#!/usr/bin/env python # Author: Andy Song # date: 2020/6/25 # 占位符: %s: string, %d: digit, %f: float name = input("Your Name Is: ") gender = input("Your Gender Is: ") age = int(input("Your Age Is: ")) job = input("Your Job Is: ") ID = int(input("Your ID Is: ")) msg = ‘‘‘ ------------------- Info of %s --------------------- Name: %s Gender: %s Age: %d Job: %s ID: %d ------------------- End ----------------------------- ‘‘‘ %(name, name, gender, age, job, ID) print(msg)
相关推荐
YENCSDN 2020-11-17
lsjweiyi 2020-11-17
houmenghu 2020-11-17
Erick 2020-11-17
HeyShHeyou 2020-11-17
以梦为马不负韶华 2020-10-20
lhtzbj 2020-11-17
夜斗不是神 2020-11-17
pythonjw 2020-11-17
dingwun 2020-11-16
lhxxhl 2020-11-16
坚持是一种品质 2020-11-16
染血白衣 2020-11-16
huavhuahua 2020-11-20
meylovezn 2020-11-20
逍遥友 2020-11-20
weiiron 2020-11-16