Hi guys, thanks for being there! You could support my channel by buying me a coffee buymeacoff.ee/PWsXo7h13
@Kemmydai2 жыл бұрын
I was looking for a concise video to explain all these 4 concepts and stumbled on this. I have used all concepts before and needed clarification but I think this content needs to be updated. 1. Sets can be created using {} without the need for the 'set' keyword. E.g., set1 = { 'a' , 'b' , 1 } 2. Dictionaries can be created using the same curly braces '{}' but will only be considered to be a dictionary if and only if it takes in keys and values, which is quite obvious. 3. The other way to make a list or a tuple or a set or a dictionary is by using their keywords. E.g., list(), tuple(), set(), dict(). I just thought to point this out. Hope it helps!
@prabuchandrasekar34372 жыл бұрын
we can define set using {}, what you used is type caset. for eg: set1={"apple","baanana","orrange"} print(set1) print(type(set1))
@flaredev Жыл бұрын
I was writing it, because a set can be defined with curly braces as well except that it doesn't take key-value pairs
@beastsole5308 Жыл бұрын
@ノウラ so once i give values to the set it becomes a dictionary?
@flaredev Жыл бұрын
@@beastsole5308 it is not really the value but you can say the syntax, if you put key-value pairs like following dict = {'key1': 1, 'key2': 2} it's a dictionary whereas in sets the elements are separated by commas like the following my_set = {1, 2, 3}
@BAGANDA7 Жыл бұрын
finally mannn someone said it
@Nick12_4510 ай бұрын
i sure love my favorite fruit, baanana 🐑👵
@ramprakash84204 жыл бұрын
Sir you mentioned that you need to use the keyword "set" to create a set. But it is not necessary , all you have to do is to enclose the data in curly braces. Eg: a={ 1, 2, 3} If you need to create a dictionary then just add a key to the above set. Eg: a={ "first" : 1, "second" : 2 }
@AK-Star0072 жыл бұрын
Good explanation, Adding my further understanding where to use them; List: Used in JSON format Useful for Array operations Used in Databases Tuple: Used to insert records in the database through SQL query at a time.Ex: (1.’sravan’, 34).(2.’geek’, 35) Used in parentheses checker Set: Finding unique elements Join operations Dictionary: Used to create a data frame with lists Used in JSON
@bhavishyapancholi10633 жыл бұрын
Thank u I understood . Tomorrow is my computer science finals 😂
@ritamchanda59132 жыл бұрын
Same bro and not even Tommorow it's today
@brighthhh74572 жыл бұрын
@@ritamchanda5913 same bro in an hour
@Starkeweg2 жыл бұрын
Bro I’m doing my finals rn
@21-abhikhillare8 Жыл бұрын
@@brighthhh7457 same bro onli 50 min left
@pramukanavodh Жыл бұрын
At least you watched this one day before. I am now heading to the exam hall 🤣
@wiredupjax2 жыл бұрын
Thank you - I wish you would explain WHY you would use dictionary vs set
@anirudhani49884 жыл бұрын
And set can be directly mentioned with {} instead of set ([])
@epiccricketarena4 жыл бұрын
i also noted that
@udayjkc2 жыл бұрын
Kindson bro , curly braces can be used to define set try This > set1={'a','b','c'} print(type(set1))
@SageArbor3 жыл бұрын
Printing dictionary values by key ... for the above example code you could print out using >print(dict1[2]) which would print "Tuesday" For a more complicated example, if the third key instead of 3 was "thirdKey" then you could print it using : >print(f'dict1[thirdKey] = {dict1["thirdKey"]}')
@findlostphone56723 жыл бұрын
Starting my data science in a weeks time and was looking for the explanation of 1:list 2:Tuple 3:Set and dictionary and I found out that this is a perfect one - easy to understand
@MalPlayss2 жыл бұрын
This was really helpful and I understood everything. Thank you!
@Naushad_jerry5 жыл бұрын
Sorry.... About set you are wrong, we can define our set in { } curly braces without key value paires for example : - Animal = {"cat","dog","cow"} and if case you want to check the type you can check by writing, print(type(Animal)) print(Animal). try it :)
@Naushad_jerry5 жыл бұрын
And yes we can define our set like this also :- Animal = set(["cat","dog","cow"])
@KindsonTheTechPro5 жыл бұрын
@@Naushad_jerry I think you are correct. Thanks for pointing that out!
@torment64255 жыл бұрын
i was about to ask this too.
@JJJJ-gl2uf2 жыл бұрын
Good intro to these Python topics. Thanks.
@KindsonTheTechPro2 жыл бұрын
You are welcome!
@MarkSudduth1 Жыл бұрын
Your explanation of the syntax used for sets is incorrect. While a set can be initialized with the use of set([1, 2, 3]), it can also be initialized with the use of curly braces {1, 2, 3}. The difference from dictionaries which also use curly braces is that dictionaries use a key-value pair for each item {"one": 1, "two": 2, "three": 3}, where a set uses a single value for each item. There is one notable exception where the use of curly braces cannot be used, for the initialization of an empty set because in this case the use of curly braces { } would actually create an empty dictionary. Also, all of these structures can be initialized by by use of their functions list(), tuple(), set(), and dict().
@easydatascience2508 Жыл бұрын
You can watch mine too. The channel has both Python and R playlists, and downloadable source files.
@applymarket9344 жыл бұрын
Perfect Explanation of these four! Thanks Bro!
@cynthita937 ай бұрын
Well explained! Thank you!
@KindsonTheTechPro2 ай бұрын
I"m so glad 😊
@stonedead1985 Жыл бұрын
hi, thanks for the video. whats' the IDE you're using on this video? it looks so cool and seems light, unlike the IDE I'm currently using. Takes time to load, and clumps most of my screen area.
@Uncle-Ronald Жыл бұрын
no clue but i recommend pycharm community and slap a nice theme on it
@aryangaurvlogs820 Жыл бұрын
Oh u made my understand it like a penny task
@matthewbrowne15613 жыл бұрын
This makes so much sense When I did my coding project for my computer science exams I kept getting errors about “tuples” I didn’t know what a tuple was In hindsight I was declaring my lists using round brackets rather than square ones and the errors appeared when I tried to append the list 🤦♂️ Thanks btw
@liamwelsh55653 жыл бұрын
Normally list and tuples are taught at the same time.
@jongab27613 жыл бұрын
Hey may I ask? What IDE are you using?
@anurudhacharyaji37152 жыл бұрын
Love you Sir🥰
@KindsonTheTechPro2 жыл бұрын
Many many thanks 😍😍
@Nick12_4510 ай бұрын
list = ["Made with defining the variable with square braces []", "A way of storing multiple values with one variable.", "First value is also of the index", 0] tuple = ("The same thing as a list,", "except cannot be changed after declaration", "and is defined with normal braces ()") set = set(["Is declared by converting a list to a set", "with the set() function.", "technically has curly braces", "cannot be ordered", "also no duplicates", "sets actually can be defined with curly braces {} but you don't use the set() function BECAUSE THAT IS NOT HOW FUNCTIONS WORK AHHH", "this video also barely explained sets and only explained how to make them"]) dictionary = { "syntax": "uses \"key\":\"value,\" syntax instead of it being numbered 0...n", "description": "are not ordered... except they are, they just use key value syntax, and are pretty similar to objects"}
@dineshp91724 жыл бұрын
ur the best tq very much sir
@calebmoughkera-65 Жыл бұрын
thank you so much bro (very clear)
@KindsonTheTechPro Жыл бұрын
You are welcome
@raunaklakdawala84392 жыл бұрын
Thanxx for such a nice explanation, I literally understood everything
@RGMUTEX2 жыл бұрын
awesome thank you so much, its really helpful
@prabuchandrasekar34372 жыл бұрын
set1={"apple","baanana","orrange"} print(set1) print(type(set1)) correct definition of defining SET
@bowenyu25052 жыл бұрын
It would be better if you can prepare everything before starting the recording. It just made us even more confused.
@KindsonTheTechPro2 жыл бұрын
I think we all need debugging skills. Besides I put the explanation and link in the description www.kindsonthegenius.com/difference-between-list-tuple-set-and-dictionary-in-python/
The reason it did not printed set1 with {} was becasue you had to delete thew word "set" thisset = {"apple", "banana", "cherry"} print(thisset)
@thakurrajsinghnarangpur53563 жыл бұрын
Sir your bakchodi is very well 😂
@sudeshnashomroy59922 жыл бұрын
Thanks for the video
@ErickG5 жыл бұрын
Great explanation. Thank you!
@KindsonTheTechPro5 жыл бұрын
This is a motivation. Thanks
@fanmanfamevlogs4983 жыл бұрын
Thank you
@0_hb_03 жыл бұрын
Tuple is immutable Tuple is immutable Tuple is immutable
@Anuj_sk5 ай бұрын
SET can also be used curly braces
@StorySoundsChannel Жыл бұрын
thank you so much
@schultzy12382 жыл бұрын
thank you for the great informative video!
@KindsonTheTechPro2 жыл бұрын
Glad it was helpful!😊
@winlab79935 жыл бұрын
I like your python code editor... please what is the name of your IDE ???
@growwithstephanie3 жыл бұрын
Thanks for this explanation
@KindsonTheTechPro3 жыл бұрын
Glad it was helpful!
@eragon02663 жыл бұрын
OMW. The people that designed this so called "language" is so lost. I don't think they know their { from their [ to their (. So convoluted!! Before you shout at me...I am a professional RPG developer on the IBMi machine. (supposed to be archaic) Oh boy what am I putting myself through learning this crap. (and it seems it is the most popular language out there.....?? WHAT!!)
@gregoryweb32 жыл бұрын
What compiler did you use sir?
@KindsonTheTechPro2 жыл бұрын
PyCharm IDE
@gregoryweb32 жыл бұрын
@@KindsonTheTechPro Thank you so much, I hope you will make more python videos so that more student will gain knowledge of it .
@Engycation3 жыл бұрын
Very Nice Video Go A Head
@ramratan20043 жыл бұрын
Thanks for showing the concept of python basics...
@youmewe5 жыл бұрын
Very nice 👍
@KindsonTheTechPro5 жыл бұрын
Thanks
@soumyajeet78095 жыл бұрын
Excellent explanation. Good job 👍👍
@samisalahuddinnurmagomedov84564 жыл бұрын
Thank u soo much Kindson.. Is sets are mutable or immutable sir?
@KindsonTheTechPro4 жыл бұрын
Sets are immutable.i.e it cannot be changed or replaced. Do remember to subscribe!
@shanthibhaskar91162 жыл бұрын
Nice bro
@srinivasmohan18703 жыл бұрын
Thank you so much Sir was very useful!!!!!!!
@makhzansabeel4 жыл бұрын
Well explained... It remove my doubts regarding these topics
@AnandAnand-uz6qo Жыл бұрын
Super sir where are you from
@Troll_Panda3 жыл бұрын
So beautiful done all the steps and clearly understand . Beautiful ❤️
@KindsonTheTechPro3 жыл бұрын
Thanks so much 😊
@sashwattanay2 жыл бұрын
Thank you, teacher.
@robinhood38414 жыл бұрын
Nice
@EgyptianFiferMods5 жыл бұрын
Thanks
@KeeganKapepe4 жыл бұрын
Great works ! Thanks a lot
@ShinyArjunSingh4 жыл бұрын
wow man...made my life.. Nice one Subscribed...Keep'em comin....
@suhanisingh106 Жыл бұрын
Thnks
@flappyBoi5 жыл бұрын
Thankyou so much!
@kchetwani1 Жыл бұрын
Ty
@everwelwisher3 жыл бұрын
thanks sir very informative and useful to improve my skills
@SAM-ol5ip2 жыл бұрын
Thank you so much sir
@KindsonTheTechPro2 жыл бұрын
Most welcome 😀
@NomeSports103 жыл бұрын
Thank you sir
@KindsonTheTechPro3 жыл бұрын
You're welcome! 😊
@munisqureshi82045 жыл бұрын
Tomorrow is my paper😂
@KindsonTheTechPro5 жыл бұрын
Good. Remember to subscribe so you get updates when new lessons are made
@vaibhavjamdale37263 жыл бұрын
Sir really great and intresting video. Support U from 🧡💚🤍. 😍
@felixudebunu52314 жыл бұрын
Good explanation. Love it.
@neogiftsebanze57524 жыл бұрын
thanks this helped a lot.
@ghanshyamvishwakarma23433 жыл бұрын
thanks for this information thank you so much
@KindsonTheTechPro3 жыл бұрын
Most welcome😊
@pritishabanerjee49924 жыл бұрын
Thnk uuu
@abhinavkumar8774 жыл бұрын
Sir you are wrong we can create set in python with curly braces, your syntax is wrong , you dont require set keyword here , Try this >>>> thisset = {"apple", "banana", "cherry"} print(thisset)
@creationgaming11304 жыл бұрын
Helped me a lot thx sir i hope you get more subscriber hare Krishna
@ilyesbenaissa53576 ай бұрын
You should explain in theory first then start implementing
@KindsonTheTechPro2 ай бұрын
Thanks for the feedback 😊
@RodrigoChagasOficial4 жыл бұрын
Thank you so much! =)
@Kiddie_Tale_s2 жыл бұрын
Hope ndo?
@itsmmdoha4 жыл бұрын
You wrote the title wrong It's #DIFFERENCE BETWEEN BETWEEN ....... but it's supposed to be #DIFFERENCE AMONG....... 😁 Whatever I needed this video Thanks for the lesson 😇
@KindsonTheTechPro4 жыл бұрын
Thanks pal! Your point is noted. I appreciate any recommendation that can help me improve. Also please remember to subscribe as I'll be making better content!
@ShahanRckz7863 жыл бұрын
y is output of set changes the order every time ?
@niteshsaini4085 жыл бұрын
thanks sir
@glenfordholder64413 жыл бұрын
great tutorial
@KindsonTheTechPro3 жыл бұрын
Thank you! Cheers!😊
@liambennett18783 жыл бұрын
Rounded braces 😁
@KindsonTheTechPro3 жыл бұрын
😊
@sh-pb1cx4 жыл бұрын
man pm me, i ll teach you how to code in pycharm)
@LuvxJacqu4li8e2 жыл бұрын
Colon value then separated by commas? At 10:07
@KindsonTheTechPro2 жыл бұрын
Nice point! I just checked it! Thanks!
@Vicboiz2 жыл бұрын
CAN ANYONE HELP ME PLEASE! my project is ok with either List or Tuple. if I don't need to change the values in the list so I should use Tuple?
@arpitbhansali48773 жыл бұрын
please make it clear to yourself first, don't confuse people
@SasidharanAnnamalai3 жыл бұрын
#SasidharanAnnamalai
@darpommop91184 жыл бұрын
Интересно
@hansonng47114 жыл бұрын
What's the purpose for using tuple since it couldn't be changed?
@PriyaAmar8484 жыл бұрын
1-Using a tuple instead of a list can give the programmer and the interpreter a hint that the data should not be changed. 2-Reading data is simpler when tuples are stored inside a list. For example, [(2,4), (5,7), (3,8), (5,9)] is easier to read than [[2,4], [5,7], [3,8], [5,9]] 3-Tuple size is less than that of list for a given set of elements. Hope i helped you understand the purpose of Tuple.
@hansonng47114 жыл бұрын
baby sri thank you bro
@sudiksha64752 жыл бұрын
👍🏻
@florent95554 жыл бұрын
you dont need the set function to create a set just { items... } is enough
@shubhamv7611 ай бұрын
Bro is learning how to Describe data types while explaining us the difference bw them
@KindsonTheTechPro2 ай бұрын
Not really. I understand the concepts quite well. I guess you mean I'm struggling with explaining while coding it out at the same time.
@adtrshynarh45962 жыл бұрын
Sir, you are wrong about the SET, Set has curly braces, for example Family_Name = {"Cat", "Tiger", "Lion"} while dictionary is this Family_Name = {"Surname": "Michael", "Middle_Name": "Jackson", "Age": 40}
@nandishkr78644 жыл бұрын
Set elements are print in alphabetical order but there it is not happen
@oldgraybeard36594 жыл бұрын
I'm sorry. Your accent, pronunciation, and cadence is very (very!) distracting.