filmov
tv
Python Zip() Function, combing lists

Показать описание
A 'how to' video showing the really simple 'zip' method to combine multiple lists and then print the contents as an ordered list. Super easy and useful.
#Code
#python
#queen
name = ["freddie", "brian", "john"]
role = ["singer", "guitar", "bass"]
nature =["showman", "geek", "bassman"]
vice = ["fancy clothes", "solar system", "bass"]
zip_list = zip(name,role,nature,vice)
final_list = (list(zip_list))
print (final_list[0])
#Code
#python
#queen
name = ["freddie", "brian", "john"]
role = ["singer", "guitar", "bass"]
nature =["showman", "geek", "bassman"]
vice = ["fancy clothes", "solar system", "bass"]
zip_list = zip(name,role,nature,vice)
final_list = (list(zip_list))
print (final_list[0])