Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python zip()

languages = ['Java', 'Python', 'JavaScript']
versions = [14, 3, 6]

result = zip(languages, versions)
print(list(result))

# Output: [('Java', 14), ('Python', 3), ('JavaScript', 6)]

print(dict(result))

# Output: {'Java': 14, 'Python': 3, 'JavaScript': 6}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
3+3 =