hmao的日记

hmao的日记



笔记

hmao · 2021年11月20日 04:28 pm · 0浏览 · 长文


class Flower():
def __init__(self,name,color,meaning):
self.name=name
self.color=color
self.meaning=meaning

flower_list=[Flower('牡丹','粉色','富贵'),Flower('百合','白色','纯洁'),Flower('玫瑰','红色','热情')]
print(flower_list[0].name,flower_list[0].color,flower_list[0].meaning)
print(flower_list[1].name,flower_list[1].color,flower_list[1].meaning)
print(flower_list[2].name,flower_list[2].color,flower_list[2].meaning)




thumb_up赞赏文章


comment 评论区

添加新评论





  • ©2025 bilibili.com

textsms
内容不能为空
account_circle
昵称不能为空
email
邮件地址格式错误
web
beach_access
验证码不能为空
keyboard发表评论


star_outline 咱快来抢个沙发吧!