【发布时间】:2021-12-08 03:45:19
【问题描述】:
我有三个列表 -
High: [18365.5, 18979.25, 19297.4, 19874.8, 20288.0, 20504.65, 20398.2]
Low: [17855.5, 18265.0, 18822.55, 18742.15, 19492.55, 20055.55, 20131.25]
Close: [18317.05, 18969.95, 18857.6, 19804.0, 20260.15, 20285.0, 20215.7]
我想检查一下
if Close [index1] > Low [index0]
print("XYZ")
elif Close[index1] < High[index0]
print("XYZ")
对 close 中的其余索引执行相同操作。
if Close [index2] > Low [index1]
print("XYZ")
elif Close[index2] < High[index1]
print("XYZ")
请帮我解决这个问题。我不明白我该怎么做。
【问题讨论】:
标签: python list if-statement