我想讀取一個YAML文件並按照它在文件中的順序打印出列表中的列表。 所以YAML: b: ...
a: ...
我的蟒蛇是: for key, value in yaml.load(open(input_file)).items():
print(str(key))
輸出變爲: a
b
但是我需要它是b然後a。我也試過iteritems(),我得到了同樣的結果。
a = [1,2,3]
b = [4,5,6]
#i have 2 lists
for x in a:
for y in b:
print x,' vs ',y
後來我 1比4,1比5,1比6 ,2比4 ......等等 我只需要3的結果: - 1對上的4 2比5 3比6 平均數第一項與b和第二與第二和第三3個第一項RD 請幫我
如何查找使用items.find方法設置的聯繫人項目的索引?找到物品後,我希望能夠移動到下一個物品,但我的代碼將我發送到集合中的第一個物品。我的計劃的一個濃縮版本低於... dim ColItms as items
dim CI as contactItem
Dim CIindex as integer
set CI= ColItms.find("[CompanyName] = ""IBM