鱼C论坛

 找回密码
 立即注册
查看: 2295|回复: 1

[已解决]想知道这个语法哪里有问题

[复制链接]
发表于 2023-6-13 22:57:06 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. ten_things="Apples Oranges Crows Telephone Light Sugar"

  2. print("Wait there's not 10 things in that list,let's fix that.")

  3. stuff=ten_things.split()
  4. more_stuff=["Day","Night","Song","Frisbee","Corn","Banana","Girl","Boy"]
  5. while len(stuff)!=10:
  6.     next_one=more_stuff.pop()
  7.     print("Adding:",next_one)
  8.     stuff.append(next_one)
  9.     print("There is %d items now."%len(stuff)
  10. print("There we go:",stuff)
  11. print("Let's do some things with stuff.")
  12. print(stuff[1])
  13. print(stuff[-1])#whoa!fancy
  14. print("stuff.pop()")
  15. print''.join(stuff)#what?cool!
  16. print'#'.join(stuff[3:5])#super stellar!
复制代码

截图未命名.jpg
最佳答案
2023-6-13 22:59:53
Snipaste_2023-06-13_22-59-34.png
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2023-6-13 22:59:53 | 显示全部楼层    本楼为最佳答案   
Snipaste_2023-06-13_22-59-34.png
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-23 18:17

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表