({{, (RefLink[AssociationThread, paclet:ref/AssociationThread])[{(Subscript[key, 1]),(Subscript[key, 2]),…}->{(Subscript[val, 1]),(Subscript[val, 2]),…}] 
gives the association \[LeftAssociation](Subscript[key, 1])->(Subscript[val, 1]),(Subscript[key, 2])->(Subscript[val, 2]),…\[RightAssociation].}, {, (RefLink[AssociationThread, paclet:ref/AssociationThread])[{(Subscript[key, 1]),(Subscript[key, 2]),…},{(Subscript[val, 1]),(Subscript[val, 2]),…}]
also gives the association \[LeftAssociation](Subscript[key, 1])->(Subscript[val, 1]),(Subscript[key, 2])->(Subscript[val, 2]),…\[RightAssociation].}})

OpenersNotesSection(Spacer1)Details

If any of the (Subscript[key, i]) are repeated, later instances replace earlier ones.

(RefLink[AssociationThread, paclet:ref/AssociationThread])[keys:>values] yields an association in which every element uses a delayed rule.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Create an association from two lists:

AssociationThread[{1,2,3}->{"one","two","three"}]

Repeated keys replace earlier ones:

AssociationThread[{1,2,1}->{"eins","two","one"}]

Create an association with delayed values:

assoc = AssociationThread[{"date","temp"}:>{DateString[],AirTemperatureData[]}]

Get the current date and temperature:

{"date", "temp"} /. assoc

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Association, paclet:ref/Association])  ▪  (RefLink[AssociationMap, paclet:ref/AssociationMap])  ▪  (RefLink[Thread, paclet:ref/Thread])  ▪  (RefLink[Transpose, paclet:ref/Transpose])  ▪  (RefLink[SparseArray, paclet:ref/SparseArray])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Computation with Structured Datasets, paclet:guide/ComputationWithStructuredDatasets])}, {▪(RefLinkPlain[Associations, paclet:guide/Associations])}})}})