Skip to content
Advertisement

How to combine the values in two lists Python

I have two lists: Names = [John, Marc, Alex] Surnames = [Stuart, Smith, Jones]

I would like to get the next list: [John-Stuart, Marc-Smith, Alex-Jones] How can I get it?

Advertisement

Answer

Use zip()

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement