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 rf_kartal 6 574 Sep-07-2021, 02:36 PM
Last Post: Larz60+
  Python Error List Index Out of Range abhi1vaishnav 3 443 Sep-03-2021, 08:40 PM
Last Post: abhi1vaishnav
  Why changing data in a copied list changes the original list? plumberpy 3 640 Aug-14-2021, 02:26 AM
Last Post: plumberpy
  changing Python files to .exe alok 2 675 Jul-20-2021, 02:49 PM
Last Post: alok
  IndexError: list index out of range Laplace12 1 691 Jun-22-2021, 10:47 AM
Last Post: Yoriz
  IndexError: list index out of range brunolelli 11 2,019 Mar-25-2021, 11:36 PM
Last Post: brunolelli
  IndexError: list index out of range ramu4651 2 1,246 Jan-24-2021, 01:45 PM
Last Post: buran
  Automating to run python script 100 times by changing parameters pmt 1 1,296 Dec-29-2020, 10:31 AM
Last Post: andydoc
Question Matching variable to a list index Gilush 17 1,893 Nov-30-2020, 01:06 AM
Last Post: Larz60+
  How to get index of minimum element between 3 & 8 in list Mekala 2 1,044 Nov-10-2020, 12:56 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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