Python 3 Programming Tutorial - Lists and Tuples

Python 3 Programming Tutorial - Lists and Tuples

sentdex

10 лет назад

160,087 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@user-si3be9kb2r
@user-si3be9kb2r - 05.03.2022 10:00

So clear explanation thank you

Ответить
@oddnumber8149
@oddnumber8149 - 27.03.2020 09:36

i am confused if the methods that we use for list can be applied into the tuples..i print(dir)) to figure out but i ddnt..For example ma,reduuce,filter can be applied>?

Ответить
@nathanunderbsd5972
@nathanunderbsd5972 - 28.02.2020 09:19

what is the correct pronounciation of "TUPLE"?? :(

Ответить
@neelamrani6970
@neelamrani6970 - 17.09.2019 16:55

Bro I think you are fastest type writer

Ответить
@alvintoro1848
@alvintoro1848 - 20.06.2019 09:38

Round brackets LMAO almost lost it when he said that hahaha.

Ответить
@jisa4gamers
@jisa4gamers - 21.05.2019 04:17

I'm no Python expert, but I've been using C for a long time and therefore I'm familiar with how much different data types requires space and how fast can they perform.
Speaking from this perspective, I would highly recommend Tuples to be used as arrays with a fixed size. Lists are way easier to handle if you have manipulations and therefore a dynamic size, However put in mind that it comes with a cost of performance and Memory.
Why would someone go for a tuple ? Simple enough, to save memory.

Ответить
@ariaalex9067
@ariaalex9067 - 17.03.2019 16:39

ive never enjoyed watching tutorials like this wow. The videos are short and interesting. i wana get lazy but i cant. i just keep watching

Ответить
@tejasvi0claw
@tejasvi0claw - 05.01.2019 00:56

Hi sentdex, I just want to take a moment to thank you for the amazing content. Just one thing, your commentary is a little faint (it could just be me though). Thanks again and keep up the great work :)

Ответить
@visheshpandita2787
@visheshpandita2787 - 25.12.2018 09:00

Did i just heard firsteth element?

Ответить
@sagarMforU
@sagarMforU - 16.10.2018 17:48

in your tutorial ...the ty of x,y are int not tuple ............correct that

Ответить
@garvielloken9510
@garvielloken9510 - 22.09.2018 04:21

1st*

Ответить
@learnsfi2422
@learnsfi2422 - 26.08.2018 20:51

How can i print the number of items in a list🤔🤔 please any one could help😣 I will really appreciate it😢

Ответить
@apexstate3127
@apexstate3127 - 10.07.2018 07:56

Dear Sir Can You Explain User Define iteration (in Class)
I read Various Of Book But I don't Know Why I can't Understand iteration
Sir , I am Waiting Your Answer as well as Vedio

Ответить
@helpmenowmark
@helpmenowmark - 27.05.2018 16:58

This is EXACTLY what I needed. Thank you for taking the time to make it and helping people like me out.

Ответить
@randybuttigieg6776
@randybuttigieg6776 - 24.04.2018 07:58

Awesome explanation thanks!

Ответить
@pranaymarella2260
@pranaymarella2260 - 05.03.2018 04:15

Great tutorial.

Ответить
@mamadoubah1597
@mamadoubah1597 - 22.02.2018 09:50

Clearly explained! Thanks... U type very fast. Any tips to improve my typing speed??

Ответить
@gowthamansubramanian928
@gowthamansubramanian928 - 12.01.2018 05:30

Massive video bro it helped me to understand the concept soon

Ответить
@chiranshuadik9818
@chiranshuadik9818 - 11.01.2018 20:14

this channel is better than Siraj Raval's

Ответить
@kurisu9056
@kurisu9056 - 14.12.2017 11:03

he giggled, i dont get that

Ответить
@yashikasorathia8639
@yashikasorathia8639 - 25.11.2017 08:59

How is Memory allocated in both tuple and list?

Ответить
@HK-sw3vi
@HK-sw3vi - 26.10.2017 20:58

holy shit Ed Snowden!!!!!!!!

Ответить
@gabrielchambers210
@gabrielchambers210 - 13.10.2017 19:51

/tts minaminaminaminaminaminaminaminaminaminaminamina

Ответить
@jukiantunen
@jukiantunen - 25.09.2017 18:55

How can I make a list that categorizes online poker players into 4 categories: ( tight, loose, aggressive and passive), and when i type their username it will show what category they are placed in?

Ответить
@fishcadet
@fishcadet - 29.07.2017 01:14

I genuinely appreciate that you took the time to make these videos and I'm sure they're very helpful, but the fact that you hit your enter key like it just murdered your family makes your videos unwatchable. I mean that in the most constructive way possible.

Ответить
@23Q19
@23Q19 - 17.05.2017 20:25

Your pronunciation of tuple is driving me nuts... Lol

Ответить
@rachelcannon3509
@rachelcannon3509 - 06.05.2017 00:59

I love you man, God bless

Ответить
@prasaddalavi9683
@prasaddalavi9683 - 09.03.2017 10:45

You are the only who is my Inspiration for python ! That's called as passion. Hats off !

Ответить
@asbat88
@asbat88 - 15.01.2017 16:35

Will it not be x = exampleFunc()? because in the case of x, y = exampleFunc(), it will declare simple integer variables to hold the returned values. right? I ran to confirm it and it is working the way I am suggesting.

Ответить
@ClayAikenism
@ClayAikenism - 22.12.2016 13:33

First of all, I love your videos!

The thing is, I can't understand the mutableness of lists and tuples. You said lists are mutable and tuples aren't. What exactly does 'changing lists or tuples' means?

Ответить
@prabhuhiremath5673
@prabhuhiremath5673 - 21.12.2016 22:37

What are the direct 2 methods to construct a tuple that has only a single item? How many ways are there to construct a list with a single item?

Ответить
@prabhuhiremath5673
@prabhuhiremath5673 - 21.12.2016 22:37

What are the direct 2 methods to construct a tuple that has only a single item in pyton

Ответить
@mohamedgabr918
@mohamedgabr918 - 01.11.2016 21:38

you know brother :)
I started watching your videos and I cannot stop :D
I really appreciate your efforts and I really thank you.
In my religion we say something better than thanking which is "Jazakom Allah Khayran"
So I do both I thank you and I say "Jazakom Allah Khayran = I ask Allah to give you the best always ....Ameen"
All my respect and regards

Ответить
@ianrees3932
@ianrees3932 - 10.10.2016 08:26

I love your videos, man. The addition of the video box was really nice. This is 2014 so I'm sure you've made even more improvements since then. I'm developing a game for fun and you're helping me further my understanding of the Python language. What playlist would you recommend I begin watching after I learn more of the basics? I saw one using PyGame, but I'll probably end up watching a bunch of others just to make sure I know the core language in-and-out.

Ответить
@timgarrett2330
@timgarrett2330 - 19.09.2016 07:55

Holy shit, I just had a "OH FUCK I GOT IT" moment. Thanks! :D:D

Ответить
@AvidIndoorsMan93
@AvidIndoorsMan93 - 17.08.2016 08:38

I am much more proficient in C++ but am taking a crack at Python and I am liking it a lot.
I know this video is old but I have a question to ask you.
I have a little practice program I am trying to do. I am trying to create a function that adds 'and' to the -1 spot of a list any list that is passed to it.
I know what I have to do but I do not know how to do it.

With the insert I need to insert 'and' at the element -1 so something like modList.insert(-1,x)
Where the x is though I am trying to ADD to whatever is in the -1 spot and add 'and' before it but without the ' '.

This is what I have so far:

def modList(someList):
someList.insert(-1, 'and')
print(someList)

spam = ['Dog','Cat','Bat','Mouse']
modList(spam)

OUTPUT: ['Dog', 'Cat', 'Bat', 'and', 'Mouse']
Desired OUTPUT: ['Dog, Cat, Bat, and Mouse']

Any help is much appreciated...

Ответить
@arihantjain-gd6nd
@arihantjain-gd6nd - 14.07.2016 19:31

is x,y = 'John', 9 a tuple?

Ответить
@fawziathkaraka7962
@fawziathkaraka7962 - 26.06.2016 14:25

Great tut!Always keep up the good job!thanks a lot

Ответить
@chrisc.4144
@chrisc.4144 - 29.05.2016 02:25

Best tutorials ever. Not sure why these videos even have dislikes on them.

Ответить
@StrictlyChosen
@StrictlyChosen - 12.05.2016 07:37

wow you sound like Roman Atwood. :D

Ответить
@ThePassingVoid
@ThePassingVoid - 13.04.2016 03:48

How do you get the selected index and selected item in a listbox in tkinter?

Ответить
@TechLord79
@TechLord79 - 03.01.2016 16:24

Tuples come from more functional languages and are for example used as arguments or return values without the need to create a full class/object (should there even be objects).And usually tuples are collections that have different types of items ("heterogeneous") whereas lists are composed of items of the same type ("homogeneous"). There are even programming languages that require lists to always have the same item type. Python doesn't seem to.A line of a CSV file read in as a tuple makes sense or as we have seen sockets use (host, port) pairs. Or like using a tuple for a vector (x, y) because x has no meaning without y and vice-versa, there is an "intimate" relationship (same argument could be made for host, port). F# has guidance for this e. g. regarding function parameters.

Ответить
@Mr01125499
@Mr01125499 - 10.05.2015 19:06

Very helpful, Thanks for the vid x

Ответить
@robertwoodruff8491
@robertwoodruff8491 - 20.03.2015 08:31

"Round brackets" heheheh :-)

Ответить
@AnthonyVipond
@AnthonyVipond - 29.12.2014 01:00

It would seem the main purpose of a tuple is protecting its data integrity throughout the execution of the script. (January, February, March, ...)

Ответить