Added: 2 years ago
From: thenewboston
Views: 81,686
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (242)

Sign In or Sign Up now to post a comment!
  • you are amazing! i love these tutorials!

  • I love your videos; they are great. For this video, given that you have mentioned a lot of other data types already, I think that it would not have been out of the question to mention that lists are mutable and as a result, the 'list' function could be a useful thing to use in [pick some example cases]. Most of the other data types previously mentioned are immutable, so converting to lists could be beneficial, blah blah blah. Thumbs up again for a great video. Thanks Bucky!

  • i understood the reason of ">>> list('bucky')"

    how do you use commands like "len" or check if someting is in this [b, u, c, k, y] i cant access it through list (which sounds logic to me) what is dthis sequence caled after is listed it up?

  • @mierich1 ahh... ok... tutorial 13 explains it right in the beginning :D

  • function.

  • God python seems so easy, but I have to memorise so much; for second I forgot how to get pow(x,y) ...thing (not variable), instead of x**y. I understood everything perfectly but what's the use if I forget them 10 mins later.

  • 28, 165, and the last ting 7! boja.

    that was awesome!

  • oh, find out what was happening. I used "list" to name my list..

  • why I can't use the 'list' function???

  • You are a great teacher and I am loving these videos. Python seems very intuitive too.

    Glad you have left mistakes and corrections in these videos. It provides an opportunity to think about what has gone wrong.

  • I'm only 13 yet i can understand u so easilly, thx for the tutorials bucky!!

  • @nikhul1 Don't say that!

    Just because you're 13 doesn't mean you can't be smart...

  • >>> condom=[8,1,14,17,4,9,55,99]

    >>> len(condom)

  • u are a wonderful teacher Bucky but i wish u were not using idle i want u to use the window that allows us to save because that's the one am using in school and am having problems putting what i have learn in that window

  • best tutorials ever

  • I spent a long time trying to figure out how to get started learning python. I don't really have much experience with any programming except for a little dabbling in Visual Basic when I was still in high school. I bought a book to try and self teach python, and I never really got anywhere with it. I've learned so much from watching these first 12 tutorials. I finally have a solid start to learning python. Thank you.

  • @kingmedabe Same here man, this guy is a Saint.

  • I noticed the mistake at when you typed number instead of numbers. The silence was hilarious.

  • wham bam thank you mam

  • Can you do del max(numbers) so you can delete that highest number?

  • @wasitrealy No, del is used to remove that number from a position. You would have to get the position of the max number in the list, then do del numbers[max number position]

  • Quick question. I tried using the max function on a list full of strings than numbers it was man=["man", "weird", "sly", "cooper"] I thought since theres no numbers it would display either the one with the most characters OR the last item in the sequence because its assigned number is the biggest but my output when i did this was "weird" can anyone tell me why?

  • @daredevilpwn I did some experimenting and it seems that it's about alphabet. min=first word in alphabetical order, max=the last.

  • @KonoShishi Your right. I just tried it and it does work like you said it does. Thanks for answering me.

  • @daredevilpwn Im not much of a programmer or anything but I had a list of 'brad','tristen','jennifer',an­d 'brandon'... tristen was the max and brad was the min... what it seems like is each character of each string has a value a-1, b-2, c-3, etc... I think it adds the characters...

  • @TheyCallMeBtoo Hey. This question of mine was answered already. The word displayed depends on ABC order. MIN is the first word in alphabetical order and MAX is the last word in alphabetical order. So the reason why tristen was the max was because the letter 't' in tristen is farther up ahead in the alphabet. Now I cans ee you have two names that start with B. The first four letters of brandon is similar to brad. The difference is that "brandon" fourth letter was an n. "brad" fourth letter was d

  • i spotted it before he entered the syntax

  • @freeman8115 same here :)

  • He could be Elzar he says "Bam!" so much.

  • @Saberoith Im glad you said Elzar instead of Emeril!

  • Yum... I'm eating birthday cake while watching this.

  • Can someone please help,

    When I try to do this I get an error:

    print = "Here, let me spell it for you" + list(b)

  • @DarkCytomation try taking away the '=' sign after print

  • @DarkCytomation have it print ("text" + list(b)). You can also have it print ("text", list(b)) :)

  • BAM!!

  • how come i didn't get the error? oh cuz u miss spelled it

  • Boo ya!

  • when you got an error and i didnt i thought i could be like the harry potter of coding...then i wasnt.. :[

  • "don't believe me?"

    bucky, I always believe you.

  • 4:02 wham bam, thank you mam! =D

  • when I did the same thing with names=['philip','tom','brandon­','robert']

    the min was 'brandon' and the max 'tom'. I thought for sure it would be the other way around.

  • Hey bucky....let us imagine we have deleted the entire sequence 'numbers' using the function 'del numbers'.....Is there any function to restore or undo this deletion? or Is the change permanent? Please do reply. Thanks.

  • I see how this could be useful for many things, but if I were making a text game you could call to a list, and change a number representing health to subtract a certain number each time an event happened.

  • print "BAM"

  • is there a function to ADD something to a list?

  • @cacheec

    Like numbers + 6 so: 0, 1, 2, 3, 4, 5, 6? You should know where the brackets go.

  • @cacheec whatveveryourlistis = []

    your_list.append

  • @cacheec your_list.append

  • no i don't believe you because you keep on lying

    kidding

  • Lol you sound like the most stoned programmer ive ever heard!

  • These are great, but I keep wanting to move his mouse cursor out of the way!

  • mine biggest is 8513

  • Comment removed

  • why list('bucky') isnt working?

    it shows:

    list('bucky')

    TypeError: 'list' object is not callable

  • @love1another1evol what python version?

  • @love1another1evol I have the same problem you do , if you find a solution could you nitify me or I will if I do instead ok?

  • @love1another1evol

    hello friend here is the answer, I think this happens maybe because of the recent updates python has experienced.

    >>> txt = "hello"

    >>> txt_list = list(txt)

    >>> txt_list

    ['h', 'e', 'l', 'l', 'o']

  • in your face, 77!

  • you sound like a hill billy but youre talking bout city things.... oposites do attract

  • "ugh... this is so embarassing" lol

  • typos are cool, right?

    thanks for the tutorials, they're great intros to what Python is all about than reading a first few pages of beginner ebooks.

  • funny guy ^^

    its a pleasure to learn from him :D

    

  • Wow, FINALLY! I've been strugling to move further. I can do CSS, HTML and PHP pretty good, not perfect, but good enough to create own things without having to flip through 100 tutorials before succeeding. Python seems to be just easy enough for me to understand at this level, but powerful enough to give me more than PHP. And you're making it easier.

  • I'm not gonna lie, ''bam'' is one of the main reasons I'm learning Python through his videos.

  • i got it right 77 XD!

    

  • loilylerlw rekkrysdsss XD!

  • I have a question: in the 3.2 version, is there a difference in the way to do the list ('bucky') example where he gets ['b', 'u', 'c', 'k', 'y']? I tried to look it up, but can't find an answer (I might be looking wrong though).

  • 'bam' lol

  • Great language. It's hard to list all the things that come to mind that are easily possible to make using python..

  • "Ahh this is so embarrassing..."

  • Why will the len, del or any function like that work when I try to save the program and run it? It just seems to skip over it. It will not give an output, but it does not produce an error.

  • @2b2a Hi, i'm new to computers science, and I know this is a late response to this but wanted others to see in case it may be helpful.

    To show output on your screen in a saved document for this tutorial you need a print statement such as: print len(numbers)

    So you would have a file with something like:

    numbers=[8,1,4,17,28,165,7]

    print len(numbers)

    Hope this helps

  • @thenewboston

    is there any way to put some element into the list in a specific place...

    just like u used del numbers[3] can we do something like: create numbers[3]=77 so our end list would look like in the beggining??

  • you really do make tutorials that are easy to follow. thanks man.

  • >>> numbers=[8,1,4,17,28,165,7]

    >>> len{numbers}

    SyntaxError: invalid syntax

    

  • @ModChimpy len[numbers]

    there, use [ ] no { }

  • Bucky has taught me AAE and is now teaching me python, very good tuts, very easy to understand

  • I've been programming in C++ and that del function just blew my mind. O.o

  • Bucky is the new jesus.

  • I have NEVER seen such a thorough teacher on youtube as you Bucky, you are the BEST

  • @kafumbla I second your statement. Bucky is such a great teacher.

    I am a java programmer for 5 year, woke up one bore morning and wanted to learn some new language and bucky makes it happen.

  • @kafumbla I agree.

  • @kafumbla

    right!

  • God bless U, U R doing a great job.

  • God bless U, U R doing a great job.

  • Darn wish I would have had some of those in 2nd grade when we did mean, median, and mode.

  • PRO TIP OF PYTHON: If you fail to splel, just like I did, just use the arrow keys to go to the failed one and press enter.

    #protip

  • python is freakin cool,,,,

  • 3:59 - 4:03, best silence ever

  • @freehwilin Reminds me of my reaction trying out python 2 code on python 3. I was "BUCKY HAS LIED TO ME!" on the inside, but I just blankly stared at my monitor going WTF?

  • what im trying to do is

    family = ['Mum','mum','Dad','dad' 'Bro','bro' 'Cat' 'cat' ,'Me', 'me']

    g=raw_input("Are you in this family? \n type name: ")

    if g == family[0:11]: print 'Yes, you are in this family!'

    else: print 'No, you are not in this family!'

    how do i get it to say instead of [0:11]

    to say, if your name any one of the elements in the list, then print you are in this family, as opposed to , if your name is every single name in this list...

  • I was wondering. If I were to make a game in Python, would I need to use Flash or would Python work as a standalone?

  • @PlasticPackage flash for the animations/graphfics, python for the code.

  • Ooh, that's a bit of a letdown. Will I need flash when I get into Java? Since I'm only using Python as a stepping stone.

  • @PlasticPackage I'm not any expert, but, as far as i know Java isn't graphfical like Python, so learn both java & flash.

  • You are a God !

  • Aren't functions called commands?

  • re-install python. the object did not install corectly. but before you do that, (i hate to patronise) check the obvious spelling of list and the parenthasis and all that crap.

  • I tried list('bucky') in Python 2.7 and got this:

    TypeError: 'list' object is not callable

    Can someone explain this?

  • funny teacher.  gotta love him

  • How do you convert a list into a string? that could be rather useful.

  • @youknowwho52 I think you type str() and put the name of the list inside the parentheses, and make that a variable. I may be wrong though, so don't hold me to it.

  • @youknowwho52 good question

  • "bam"

    

  • You can say concatenate but you can't say tick.

    DUDE WHAT THE FUCK

  • argh "numbers" doesn't look like a word anymore -.-

  • @iChopBalls OMFG, u r so right!!! XD

  • "Wam bam thank you ma'am" is now a meme.

  • you explained it wayy better than my teacher..thanks!!!

  • when you use

    list('bucky')

    what is the name of the array so you can use len, min and max on it?

  • Thank you

  • How do you add things to a list?

  • WHAM BAM THANK-YOU MA'AM!

  • BAM

  • oops, didnt read comments...

  • Is there a similar keyword which inserts elements to a list?

  • Comment removed

  • does anyone know how to clear the shell screen on windows??

  • how do you add numbers back after you've deleted them?

  • @TheRealSlimStephen you can type:

    numbers.insert(*where you wanna put it*, *the number you wanna put in*)

    so for exemple if my sequence is [1,2,4,5] and i wanna add 3 i would say:

    numbers.insert(2,3)

    and your sequence will then become [1,2,3,4,5]

    hope this wasnt too confusing....

  • @smikesmike05 how about list.append(*the number you wanna put in*)?

  • @Grkgermn333 that could work but it automatically assigns the value to the end of the sequence.

    list.append should only be used if you wanna assign a value at the end.

    using the insert function alows you to put the value you want WHERE you want it. btw dont forget the first value is actually value 0 in python.

  • wow, i could never EVER remember all the values in here. very good tutorials, i appreciate it.

  • fail

    

  • this tutorial was so good that i made an ''experiment''. i created a list like this: names=['mom','dad','sis'] and then i use the functions i learned >>>len(names) 3 >>>max(names) 'sis' (there i started freaking out and i thought that python takes the last element from the list for max and the first for min so i continued my ''experiment'') >>>min(names) 'dad' (and then i said WTF?!) what's the meaning of these functions in a list like this?
  • @12yearsafter12 this is because it goes by alphabetical order

  • you . are . epic.

  • When you typed in number instead of numbers, I was literally screaming at my computer screen before you got the error message.

  • I'm going to pass my python class because of your videos, thanks dude!!

  • 5 stupid people disliked this

  • wow dude you really are helpful, i just started today and I find it easy as heck thanks to your teaching

  • i'm surprised that python actually has some functions that in c++ you have to make by yourself

  • Very well put together.....

  • Man you are hilarious LOL...... "We're getting an error, Ugh this is SO embarassing" ROFL .. And Great tutorials.

  • hey bucky you are truly awesome.. i wish you ever get rewarded for this in someway. the world really needs more people like you... who can share their knowledge without thinking about themselves... a big thumbs up to you.

  • Oh BUCKY I am the biggest fan of yous.

  • Thanks po

  • I tried the max and min functions on a list consisting of nothing but letters and the outputs were indeed letters...did python select random letters or is there a method to such madness?

  • How about stringed lists?

    For example=

    List=['Math','LA','Bio','PE']

    I tried:

    List[1]=English

    List[LA]=English

    List['LA']=English

    None work.

  • @narutofan190249

    i dont understand your stuff but... you should always enclose a string with quotation marks(" ")

    if im right you wanna replace 'math' by english ?

    then List[1]="English"

    and i think you should only work with integers(so you cant do like this List['LA']="English"

  • @newnumide Mmm ok it worked. Thank you

  • @narutofan190249

    list can't be stringed. if it could it wouldn't be a list anymore.

    use array instead.

  • its ok alot of errors in programming are spelling and capitalization

  • Can you add values to the list?

  • @MachoNacho8 Yes, there is a function called the append function, for example, lets say we wanted to re-add that 77 back in, we would type numbers.append(77)

    it involves putting the name of your list/array and adding .append() to the end, with the required value inside the brackets. Hope that helps :D

  • what if i wanna add the numbers together in the list ? like say i got [1,2] i wanna add em up to 3, how do i do it ?

  • @perfectmoron1 for adding a list, use sum("List Name") i believe and if you type it in as a list, something like sum([1,2]) Hope that helps :D

  • bucky! bucky! bucky! bucky! bucky!

    keep making moooooore tutorials

    ERES UN EXCELENTE PROFESOR!!!!!!!!!!!!!

  • moment 4:05. is superb..

  • the len() function can be used for strings.

    a = "hello"

    len(a) = 5

  • 4:07... i was eating and you made me laugh... you made me spit the food xD

  • It's ok you f'd up. Your still great!

  • Love your vids :) Congratz on the camera

  • wam, bam, thank you mam

  • dude, you're great at teaching. I love your vids

  • Like this list() which makes a string to list... Is there any thing in python to make a list back to string.

  • lol i was like when is he gonna realize number not= numbers

  • great tutorial but sir have you book of python i wannna read boooks also thanks my sweet teacher(GOD

    )bless you

  • awesome!

  • Thank you very much.

  • I have a question, do u have a list of functions and what they do? would be great :)

  • there're thousands of fuctions, wht do u excpect him to do, write them all here?

  • @MasterofMysteryVol2 The list will be long plus Python also has classes with its methods which will be even more items to list. The best thing to do is to look at Python's documentary or download a cheat sheet, whichever fits you.

  • How you add a new number without writing it all over again, e.g. you have a long list of numbers..?

  • x = [1, 2, 3, 4, 6, 7, 8, 9]

    x.insert(4, 5)

  • thx :)