Python Forum
Changing Index of 2 List in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Index of 2 List in python
#1
Hi Everyone,

I have an issue/concern I have two lists column A(albm) and column N(tlt) and below are the code I used to create the lists.
What I am seeking to do is put Column A which NASB and NTSB is and Column N where the tracks are? How can I accomplish this? Thanks
cb = sheet2.cell(row=acaw+1, column=1)
           albm.append(cb.value)
tlt = sheet2.cell(row=acaw+1, column=1)
            tlt =sheet2.cell(row=acaw + 1, column=14)


spreadsheet = [
    Column A   Column N
    ( "NASB", "Track1.mp3" ),
    ( "NASB", "Track2.mp3" ),
    ( "NASB", "Track3.mp3" ),
    ( "NASB", "Track4.mp3" ),
    ( "NASB", "Track5.mp3" ),
    ( "NASB", "Track5.mp3" ),
    ( "NTSB", "Track1.mp3" ),
    ( "NTSB", "Track2.mp3" ),
    ( "NTSB", "Track3.mp3" ),
    ( "NTSB", "Track4.mp3" ),
    ( "NTSB", "Track5.mp3" ),
    ( "NTSB", "Track5.mp3" )
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Virtual Env changing mysql connection string in python Fredesetes 0 324 Dec-20-2023, 04:06 PM
Last Post: Fredesetes
Thumbs Down I hate "List index out of range" Melen 20 3,157 May-14-2023, 06:43 AM
Last Post: deanhystad
  IndexError: list index out of range dolac 4 1,843 Jul-25-2022, 03:42 PM
Last Post: deanhystad
  Changing a string value to a numerical value using python code and a lamda function Led_Zeppelin 6 1,539 Jul-05-2022, 11:29 PM
Last Post: deanhystad
  IndexError: list index out of range Anldra12 2 1,408 May-03-2022, 01:39 PM
Last Post: Anldra12
  IndexError: list index out of range rf_kartal 6 2,761 Sep-07-2021, 02:36 PM
Last Post: Larz60+
  Python Error List Index Out of Range abhi1vaishnav 3 2,236 Sep-03-2021, 08:40 PM
Last Post: abhi1vaishnav
  Why changing data in a copied list changes the original list? plumberpy 3 2,190 Aug-14-2021, 02:26 AM
Last Post: plumberpy
  changing Python files to .exe alok 2 2,185 Jul-20-2021, 02:49 PM
Last Post: alok
  IndexError: list index out of range Laplace12 1 2,186 Jun-22-2021, 10:47 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020