Python Forum
I’m Flat out struggling to understand list indexes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I’m Flat out struggling to understand list indexes
#2
In the fist list 2nd index, first index of inner list the value 3
if you wish to pull and index you do not do an assignment operation

Output:
>>> x = [0, 1, [2]] >>> x [0, 1, [2]] >>> x[2] [2] >>> x[2][0] 2 >>> x[2][0] = 3 >>> x[2][0] 3
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply


Messages In This Thread
RE: I’m Flat out struggling to understand list indexes - by menator01 - Jul-17-2020, 06:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Comparing List values to get indexes Edward_ 7 1,186 Jun-09-2023, 04:57 PM
Last Post: deanhystad
  Replace columns indexes reading a XSLX file Larry1888 2 997 Nov-18-2022, 10:16 PM
Last Post: Pedroski55
  Struggling with Juggling JSON Data SamWatt 7 1,904 May-09-2022, 02:49 AM
Last Post: snippsat
  Syntax errors: Struggling to setup enviroment and load packages AH56 5 2,800 Jun-30-2021, 01:01 PM
Last Post: AH56
  Struggling for the past hour to define function and call it back godlyredwall 2 2,233 Oct-29-2020, 02:45 PM
Last Post: deanhystad
  struggling with != statements CallumRoberts2004 2 1,557 Aug-18-2020, 03:01 PM
Last Post: GOTO10
  How to print array indexes? Mark17 6 2,759 Aug-03-2020, 04:26 PM
Last Post: Mark17
  Struggling with nested list gr3yali3n 3 2,333 Jul-09-2020, 05:30 PM
Last Post: DPaul
  Understand list comprehension and draw PUP280 9 3,994 Apr-23-2020, 05:25 PM
Last Post: PUP280
  Struggling to exit this while loop fatherted99 5 2,490 Feb-08-2020, 07:46 PM
Last Post: fatherted99

Forum Jump:

User Panel Messages

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