题解 | #朋友们的喜好#

朋友们的喜好

https://www.nowcoder.com/practice/c62ef46892ef4c478802df983f8624b7

name = ['Niumei', 'YOLO', 'Niu Ke Le', 'Mona']
friends = [['Niumei', 'YOLO', 'Niu Ke Le', 'Mona']]
food = ['pizza', 'fish', 'potato', 'beef']
number = [3, 6, 0, 3]



# 将 food 列表添加到 friends 列表的第二行
friends.append(food)

# 将 number 列表添加到 friends 列表的第三行
friends.append(number)

# 打印 friends 列表
print(friends)

全部评论

相关推荐

程序员牛肉:可以说含金量不如王者荣耀省标。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务