fork download
  1. # your code goes here1.1 创建一个列表,存储3 个 AI 训练常用工具名称,要求遍历列表并分行格式化输出每个工具。(15 分)
  2.  
  3. print("--- AI训练常用工具 ---") # 增加行1:打印标题
  4. tools = ["TensorFlow", "PyTorch", "Keras"]
  5. print("初始工具列表:", tools )
  6. print("当前工具数量:", len(tools) ) # 增加行2:打印列表长度
  7. print("每个工具名称:") # 增加行3:提示下面逐项打印
  8. for t in tools: # 增加行4:循环逐项打印
  9. print(" -", t ) # 增加行5:打印单个工具
Success #stdin #stdout 0.09s 14184KB
stdin
Standard input is empty
stdout
--- AI训练常用工具 ---
初始工具列表: ['TensorFlow', 'PyTorch', 'Keras']
当前工具数量: 3
每个工具名称:
 - TensorFlow
 - PyTorch
 - Keras