Link to home
Start Free TrialLog in
Avatar of ltpitt
ltpitt

asked on

Merge lists using index in Python

Hi all!

I am trying to merge 3 lists, without success.

titles = ['Mario','Luigi']
prices = ['10','1']
descriptions = ['Mario is cool!','Luigi is boring :(']
game_list = []

for idx, val in enumerate(titles):
    game_list.append([titles[idx], prices[idx], descriptions[idx]])

Open in new window


What am I doing wrong?
ASKER CERTIFIED SOLUTION
Avatar of gelonida
gelonida
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial