Python Lists || Python Tutorial || Learn Python Programming

  • Published on Apr 13, 2016
  • Lists are a way to store ordered data. In this Python tutorial, we show you how to create lists, access elements by index, slice lists, join two lists (concatenation), and more. We will talk about sets, dictionaries and tuples in separate videos.
    To learn Python, you can watch our playlist from the beginning:
    We recommend:
    Python Cookbook, Third edition from O’Reilly
    The Mythical Man Month - Essays on Software Engineering & Project Management
    Shop Amazon Used Textbooks - Save up to 90%
    Subscribe to Socratica:
    To support more videos from Socratica, visit
    Socratica Patreon
    Socratica Paypal
    We also accept Bitcoin! :)
    Our address is: 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
    Python instructor: Ulka Simone Mohanty
    Written & Produced by Michael Harrison
    FX by Andriy Kostyuk

Comments • 125

  • Socratica
    Socratica  Month ago +1

    Welcome to Socratica! You can see our entire Python Playlist here:
    Subscribe to see all our new videos!

  • Geni Gueiros
    Geni Gueiros 8 days ago +3

    Thanks, Socratica for the lesson. I used some of your tips to create this blog post

  • Jithakrishna Prakash
    Jithakrishna Prakash 23 days ago

    World's best introduction to python. No chance of any other tutorial to top this.

  • Julian Aguirre
    Julian Aguirre 24 days ago

    These videos are amazing. Thank you.

  • Sphesihle Makhathini

    I think you confused computer science with Python 🤔

  • Noa Perez
    Noa Perez Month ago

    hello great videos, is there a video on list within lists? thank you:)

  • Luka Iashvili
    Luka Iashvili Month ago

    Simply Awesome, Thank you!!

  • Pushkar Raj
    Pushkar Raj 3 months ago

    Well explained ma'am.. thanks a lot. Plz discuss Python array too.. I m confused to see array coz its looks like list..
    And your video is so fast. It has to be pause many times to see, understand and grasp it..

  • Socratica
    Socratica  3 months ago +14

    It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉

    • Lilahao
      Lilahao 3 months ago

      Socratica this video was so helpful before my test tomorrow, thank you! 💓

  • Socratica
    Socratica  3 months ago

    We're halfway there. We still need your help! Support Socratica Python Kickstarter:

  • Socratica
    Socratica  4 months ago +1

    Support what you love! Socratica has a Kickstarter to make more Python:

  • mahdi bahrami
    mahdi bahrami 5 months ago

    Imagine these lists:
    [1, 3, 4, 5, 6, 7]
    [4, 5, 4, 6, 8, 9, 11, 34]
    How do you get a list from second item on those lists to the end but not the last 2 items from each list?

    • Paul Gross
      Paul Gross 2 months ago

      Slice with [1: -2] like this:
      list1 = [1, 3, 4, 5, 6, 7]
      list2 = [4, 5, 4, 6, 8, 9, 11, 34]
      list1[1: -2]
      *[3, 4, 5]*
      list2[1: -2]
      *[5, 4, 6, 8, 9]*

  • Jonathan Davis
    Jonathan Davis 7 months ago

    how does she do the sound effects and background, so cool

  • Singularity
    Singularity 7 months ago +2

    *socratica:* "Lists start at zero..."
    *lua:* "Them fighting words!"

  • leathernluv
    leathernluv 7 months ago +1

    To get the list reversed, but not reverse the list in place: example[::-1]
    That way you get the reverse without changing the list order. I figured that one out via typo.

  • Alexander Zhang
    Alexander Zhang 7 months ago


  • ShakespeareCafe
    ShakespeareCafe 8 months ago

    This woman looks and sounds exactly like Wendy Rhoades on Showtime's Billions, which is one of the best shows after Breaking Bad

  • Esteban Escudero
    Esteban Escudero 8 months ago

    I really enjoy your videos. You make learning very easy and interesting. Thumbs up for the length of each video also. They are short as they should, but with plenty of useful info. You have won a subscriber. :)

  • Yamkela Balisa
    Yamkela Balisa 9 months ago

    what does the return statement actually do in python?
    im still a beginner

    • Yamkela Balisa
      Yamkela Balisa 9 months ago

      can one clear makes more than one example for me, 2 or 3 will be enough

  • Venkat Gurram
    Venkat Gurram 10 months ago

    very creative presentation with sci-fi feel. The girl is a good actor and has the looks.

  • Linda Tochukwu
    Linda Tochukwu 10 months ago +1

    on point ur charisma

  • Ismael Amorim
    Ismael Amorim 11 months ago

    Super maravilhoso essas Aulas

  • William Smith
    William Smith 11 months ago

    uh how do you find the amount of values in a list

  • S M Fahim
    S M Fahim Year ago

    when I use:
    I get some results and the first 3 are:
    '__add__', '__class__', '__contains__'
    But how to use these classes which contains double underscores?

  • Yousif Ahmed
    Yousif Ahmed Year ago

    You are very great. Thank you a lot

  • Hritik Vashishth
    Hritik Vashishth Year ago

    she sounds exactly like cortana from halo

  • Elias Alirio Moran Saget

    You are fun :)

  • eng
    eng Year ago +1

    Please make a udemy or Udacity course for Python would definitely buy

  • Vasconcelos
    Vasconcelos Year ago

    thank you for do this videos

  • MD Sadaquat hussain

    Guys check out telusko also..its a good source for beginners with around 74 videos..Thank me later😀

  • Naat Status
    Naat Status Year ago

    Great video but I think there is some missing...........!!!!

  • Kizito Bukenya
    Kizito Bukenya Year ago

    This an amazing video

  • Spyder Spyder
    Spyder Spyder Year ago

    Very good tutorial. I liked it

  • Tamer Aziz
    Tamer Aziz Year ago


  • cornelxbox25
    cornelxbox25 Year ago +1

    Socratica.... You just made the list!!!

  • Daniel Fernandes
    Daniel Fernandes Year ago

    I like this Command & Conquer feeling every time I watch your videos :)

    • Bruno Oliveira
      Bruno Oliveira Year ago

      Just hopping for her to say: "unable to comply, building in progress"

  • Rambabu verma
    Rambabu verma Year ago

    Can I insert value in list using command line using while loop...........plz provide me this code

    • Rambabu verma
      Rambabu verma Year ago

      As we insert in array in c programing. Is it possible there.

  • Francis
    Francis Year ago

    She deserves a grammy.

  • pravin
    pravin Year ago +4

    "i would have a very, very long list." I am falling for this host! Somebody help me

  • Ben Rawner
    Ben Rawner Year ago

    These are the best Python videos

  • Hugo
    Hugo Year ago


  • mehjebin mujeeb
    mehjebin mujeeb Year ago +28

    I don't think I've ever enjoyed learning so much!!!

    • Socratica
      Socratica  Year ago +1

      That is so wonderful to hear!! We're so glad you're watching.

  • GEScott71
    GEScott71 Year ago

    Another great tuturial, thanks! I just made a contribution and all of you should too :-)

  • Josip Marić
    Josip Marić Year ago

    freakin awsome video i feel like i'm in some game and after a video when i enter my text editor like i'm in freakin army mission lol.

  • Cerbyo
    Cerbyo Year ago

    reverse(...) method of builtins.list instance
    L.reverse() -- reverse *IN PLACE*
    Okay how the hell does that tell me anything much lesss everything? I type
    reverse(mylistname)....I get an error
    I type L.reverse(mylistname)....I get an error.
    ???????????????????????????? really tells me sooo much. Reverse will REverse *inplace*? Wouldn't a clearer method be "will invert entries" or "will change order making last entry first, first entry last etc"??

    • Cerbyo
      Cerbyo Year ago

      a= list(reversed(primesorwhateverurlistnameis)) will display the list in reverse and allow you to call it up as 'a' instead of typing the whole bit each time u want it displayed reverse since it doesn't apply it straight to ur list. BUT THE FRIGGIN HELP THING DOESN'T TELL YOU ANY OF THAT.

  • Yilmaz Bingol
    Yilmaz Bingol Year ago


  • sharmila rani
    sharmila rani Year ago

    it is so interesting to watch video of u

  • ame7272
    ame7272 Year ago +1

    You had me at "Order...matters" lol

  • TheBobbyking82
    TheBobbyking82 Year ago +1

    Great video! I love the whole futuristic look. just sub, hoping to learn python to try to eventually head to C++.

  • ParaDise
    ParaDise Year ago

    Very beautiful video !! I actually learned something !!!

  • Video Collector
    Video Collector Year ago

    I am using Windows10 and I have write some codes to scrape information from a website but I can't copy anything from my command prompt or anaconda prompt. I figure it out that my mouse dosen't working on both command prompt. Can anybody help me?

  • Johny knows
    Johny knows Year ago

    а по русски мона?

  • Tanner Barcelos
    Tanner Barcelos Year ago +8

    Plot twist: this is an AI machine teaching us this.. the coded AI bot is teaching us... to code ? 🤔😂

  • Breath Growth
    Breath Growth Year ago +1

    Oh her voice really gets my attention, i can finaly probably learn this

  • SuperBror1
    SuperBror1 Year ago

    I'm just a beginner at Python and 11years old, and I understood! Good job!:D

    • pablo ramos
      pablo ramos 8 months ago

      Escape the Minecraft kido, and you'll be free to code an AI army... hehehehehhe

  • 王玮
    王玮 Year ago +1

    One of the best video tutorials ever

  • S Schiavo
    S Schiavo Year ago

    Excellent video - thanks!

  • Alexander Lysberg

    I like to think of slicing as the first unit starting from 0, and the second unit starting from 1. If you have a list of [a. b. c. d. e] and you want the 2:4 slice, you can count a = 0, b = 1 c = 2 (start slice). Then you can count again a = 1, b = 2, c = 3, d = 4 (end slice).
    Because "2 to 4 but not including 4" is such a hassle to say in the head.

  • mrbrockpeters
    mrbrockpeters Year ago +6

    This is my favorite resource for learning Python lately. Short and to the point explanations. I don't use Python enough. In fact, I only seem to use it in the context of working with the Amazon AWS CLI tool.
    Nevertheless, I got a website in PHP that computes does some computations at night. My buddy turned me onto Python when he wrote a sample script that did the job of a PHP script in like a few seconds whereas it took the PHP script like almost 5 minutes to complete. I'm gonna figure out how to port those scripts into Python in my leisure time at night and it's gonna be fun as hell yo! It'll take me some time to figure out but I think it'll pay off later when all those cron jobs are complete faster.
    Step 1. Figure out how to work with Lists.

  • Melinda Sterne
    Melinda Sterne Year ago

    great videos! so informative