小编use*_*623的帖子

从单个列表python打印

编辑:

 ['Station 5 average is less than 1.62644628099', 'Station 6 average is less than 1.62644628099', 'Station 7 average is less than 1.62644628099', 'Station 8 average is less than 1.62644628099', 'Station 9 average is less than 1.62644628099', 'Station 10 average is less than 1.62644628099']
Run Code Online (Sandbox Code Playgroud)

['Station 1 average is greater than 1.62644628099', 'Station 2 average is greater than 1.62644628099', 'Station 3 average is greater than 1.62644628099']
Run Code Online (Sandbox Code Playgroud)

是否有一个代码可用于生成结果,以便打印时的输出如下所示

Station 5 average is less than 1.62644628099
Station 6 average is less than 1.62644628099 …
Run Code Online (Sandbox Code Playgroud)

python printing list

1
推荐指数
1
解决办法
83
查看次数

结合两个元素python

我有一个列表,从数据创建称为stations = []

打印出来的

 ['france', 'england', 'germany', 'china', 'paris', 'sydney', 'gold coast', 'canberra', 'perth', 'melbourne']
Run Code Online (Sandbox Code Playgroud)

我还有另一个功能x,当打印时.

[0.0, 3043.004178666758, 21558.2996208357, 40246.748450913066, 40908.82213277263, 43786.0579097594, 67781.1426515405, 79693.11338661514, 65046.35819797423, 92804.01912347642]
Run Code Online (Sandbox Code Playgroud)

我有两个问题.

首先是有一种方法来组合这两个,所以我可以打印一个新的列表或打印的功能

[france = 0.0, england = 3043.004, germany = 21558.2999] and so on
Run Code Online (Sandbox Code Playgroud)

其次我可以创建变量或列表或者某些东西,使得france保持值= 0.0,这样如果后来生成0.0,我可以调用france和france变量中的任何数据吗?

python combinations dictionary list

0
推荐指数
1
解决办法
115
查看次数

标签 统计

list ×2

python ×2

combinations ×1

dictionary ×1

printing ×1