python 打印好看的个人信息卡
name = input('name:') age = input('age:') hometown = input('hometown:') hobbie = input('hobbie:') msg = f''' ---------- info of {name} ---------- Name : {name} Age : {age} Hometown : {hometown} Hobbie : {hobbie} ------------- end ------------------ ''' print(msg)
执行结果为:
name:lgonfei age:28 hometown:河南 hobbie:money,girl ---------- info of lgonfei ---------- Name : lgonfei Age : 28 Hometown : 河南 Hobbie : money,girl ------------- end ------------------
作者:龙飞
-------------------------------------------
个性签名:独学而无友,则孤陋而寡闻。做一个灵魂有趣的人!
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!