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
  IndexError: list index out of range dolac 4 422 Jul-25-2022, 03:42 PM
Last Post: deanhystad
  IndexError: list index out of range Anldra12 2 597 May-03-2022, 01:39 PM
Last Post: Anldra12
  IndexError: list index out of range rf_kartal 6 1,455 Sep-07-2021, 02:36 PM
Last Post: Larz60+
  Python Error List Index Out of Range abhi1vaishnav 3 1,121 Sep-03-2021, 08:40 PM
Last Post: abhi1vaishnav
  Why changing data in a copied list changes the original list? plumberpy 3 1,414 Aug-14-2021, 02:26 AM
Last Post: plumberpy
  changing Python files to .exe alok 2 1,466 Jul-20-2021, 02:49 PM
Last Post: alok
  IndexError: list index out of range Laplace12 1 1,462 Jun-22-2021, 10:47 AM
Last Post: Yoriz
  IndexError: list index out of range brunolelli 11 3,619 Mar-25-2021, 11:36 PM
Last Post: brunolelli
  IndexError: list index out of range ramu4651 2 2,175 Jan-24-2021, 01:45 PM
Last Post: buran
  Automating to run python script 100 times by changing parameters pmt 1 1,829 Dec-29-2020, 10:31 AM
Last Post: andydoc

Forum Jump:

User Panel Messages

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