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 brunolelli 11 553 Mar-25-2021, 11:36 PM
Last Post: brunolelli
  IndexError: list index out of range ramu4651 2 424 Jan-24-2021, 01:45 PM
Last Post: buran
  Automating to run python script 100 times by changing parameters pmt 1 827 Dec-29-2020, 10:31 AM
Last Post: andydoc
Question Matching variable to a list index Gilush 17 846 Nov-30-2020, 01:06 AM
Last Post: Larz60+
  How to get index of minimum element between 3 & 8 in list Mekala 2 392 Nov-10-2020, 12:56 PM
Last Post: DeaD_EyE
  List index out of range error while accessing 2 lists in python K11 2 505 Sep-29-2020, 05:24 AM
Last Post: K11
  Changing to new Python formatting example leodavinci1990 3 573 Sep-22-2020, 07:36 PM
Last Post: yaythomas
  List index out of range error when attempting to make a basic shift code djwilson0495 4 714 Aug-16-2020, 08:56 PM
Last Post: deanhystad
  list.index() help qmfoam 4 660 Aug-07-2020, 07:25 PM
Last Post: qmfoam
  Function to return list of all the INDEX values of a defined ndarray? pjfarley3 2 567 Jul-10-2020, 04:51 AM
Last Post: pjfarley3

Forum Jump:

User Panel Messages

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