> x1 x2 x3 借助 range() 和 len() x_n = ["x1","x2","x3"] for i in range(len(x_n)): print(。Python中使用|Python中使用 for 循环来拿遍历 List 的值。" />

Python中使用|Python中使用 for 循环来拿遍历 List 的值

常规版本 简单的 for 循环遍历 x_n = ["x1","x2","x3"] for x in x_n: print(x) >> x1 x2 x3 借助 range() 和 len() x_n = ["x1","x2","x3"] for i in range(len(x_n)): print(

    推荐阅读