Created
November 20, 2022 15:17
-
-
Save srang992/a13779b9399fa1f6ca2f6dd3444957d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list1 = [1, 2, 3, 4 ,5] | |
list2 = ["one", "two", "three", "four", "five"] | |
new_dict = Dict(zip(list1, list2)) | |
#= | |
it will return | |
Dict(5 => "five", 4 => "four", 2 => "two", 3 => "three", 1 => "one") | |
=# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment