0
我想在構建元組時考慮多個變量時使用下面的表達式。如何在不出現錯誤tuple must match array size
的情況下使用此表達式或類似表達式?我想避免使用ELIF爲每個不同的k_ewaste_comm
如果可能的話在NumPy元組中使用OR運算符多個變量
if k_ewaste_comm_1 or k_ewaste_comm_2 or k_ewaste_comm_3 == 4 :
items.append((Address,
x,
y,
x,
y,
ReasonCode,
SRNumber,
SRNumber,
FullName,
ResolutionCode,
HomePhone,
created_object,
CreatedBy,
UpdatedDate,
k_ewaste_count_1 or k_ewaste_count_2 or k_ewaste_count_3
k_ewaste_comm_1 or k_ewaste_comm2 or k_ewaste_comm_3,
date_object,
GISLayer,
# ServiceNotes,
Prior_Resolution_Code,
k_ewaste_name_1,k_ewaste_name_2, k_ewaste_name_3,
))
這是正確的嗎?