This is one of the best helpful video for the beginners who are learning Python.
@sushilkumar-ef7gh6 жыл бұрын
I have to say that you have made coding more interesting then ever for me ....Thanks a lot
@AmulsAcademy6 жыл бұрын
Welcome:)
@babyfox2055 жыл бұрын
great explanation of the 'key' for sorting, your explanation was the best of all 5-6 that I've seen today and were unable to really understand why we can put any function into the key. Thank you!
@denizyarar47813 жыл бұрын
thank you i'm a year 11 student writing code for an NEA and this vid is a lifesaver
@AmulsAcademy3 жыл бұрын
Thank you :)
@fun-ih5sc5 жыл бұрын
9:18 . * When we call the userdefine function we are not passing any argument as but when you define the function it is taking one argument .How is it working. * key=SortBySec, here how the argument in function defination "Element" is pointing toward every index of a list Thanks & Regards Aditya
@AmulsAcademy5 жыл бұрын
you should mention function name as key, no need to mention arguments. when you define key function it should contain only one parameter, if it contains more we will get error. when we use sort function it will take the first value of list and compare it with second element and based on the comparison it will sort the list. [when key is not mentioned]. when key is mentioned then instead of comparing first element with second, it will pass that first element to that function, next second element to that function later based on that function result it will sort the list. :)
@qzorn44406 жыл бұрын
this is sooo relaxing python information. I listen to your video on my coffee break to relax. S*) thanks
@AmulsAcademy6 жыл бұрын
Welcome :)
@vishnubhardwaj25953 жыл бұрын
your voice is really very soothing and video is very helpful.
@AmulsAcademy3 жыл бұрын
Thank you 😊
@trishulsingh29073 жыл бұрын
Your channel is Underrated . Keep going one day you will reach 10k Subscribers .
@angelomichel60744 жыл бұрын
this information is so satisfying !!!Thank you so much Amuls Academy
@AmulsAcademy4 жыл бұрын
Glad you liked it!
@sangeethaagoudar21752 жыл бұрын
This is one of the best video of knowing exactly how the nested list worked with sort .Thank you so much 😊
@alimujtaba12083 жыл бұрын
your teaching method is very best i satisfier
@HarshRaj-bm9eg6 жыл бұрын
mam i am so so so thankful to u. you cannot even imagine what you are to me
@AmulsAcademy6 жыл бұрын
Welcome:)
@josephdzn98685 жыл бұрын
good explanation. 2nd example can also be done by: list2.sort(key=lambda x: x[1])
@ilzz98564 жыл бұрын
Hi bro can u explain working of that expression?
@josephdzn98684 жыл бұрын
I am not an expert here (still learning) but you can think of lambda as a throw away function. No need to define a separate function but you can encapsulate expressions (and arguments) using lambda - if that makes sense. Amulya's channel clearly explains the Lamdba function, check that out.
@mananbhatia92422 жыл бұрын
how we can do to descending order using this function?
@Suhail_202k Жыл бұрын
Really one of the best videos on KZbin hatsoff ,great explanation mam thanks for your efforts,i hope you will do more videos ❤
@nagapurisandeep22893 жыл бұрын
Your explanation is good mam.
@AmulsAcademy3 жыл бұрын
Thank you 😊
@sairamnagarajan82895 жыл бұрын
Simplistic explanation. Thanks for your effort.
@AmulsAcademy5 жыл бұрын
My Pleasure :)
@zhimwar13675 жыл бұрын
Thank you so much for sharing this. U have solved one big question in head for long time.
@AmulsAcademy5 жыл бұрын
Pleasure :) And that is ?
@krishk48705 жыл бұрын
hey i got doubt pls clear it... that in 7:55 how the fucn (sortbysec) is works its just return the parameter(element's) first indexing position,that how could sort the list regards with sec value of sublist of list2 ????????? pls xplain the key fuction def sortbysec() plsssssssss amul !!!!!!!!!!
@AmulsAcademy5 жыл бұрын
key function serves as a key for the sort comparison, it won't sort the list. "key" function transforms each element before comparison, next based on that transformed value sort() will sort the list. :)
@gani36766 жыл бұрын
Hi Amul, Will be waiting for continuous video. Thanks
@AmulsAcademy6 жыл бұрын
Thank you:)
@ilzz98564 жыл бұрын
In the video you done ascending order through first element and by second element . How can we make descending order in that list with second elements?
@AmulsAcademy4 жыл бұрын
take reverse=True :)
@steveaman51263 жыл бұрын
nice in-depth knowledge
@AmulsAcademy3 жыл бұрын
Thank you 😊
@abdullakhan46324 жыл бұрын
very good. i like your explanation. grate 👍👍👍
@AmulsAcademy4 жыл бұрын
Thanks! 😃
@mohsharma39374 жыл бұрын
THANK YOU SO MUCH MA'AM YOU CLEARED MY DOUBT
@AmulsAcademy4 жыл бұрын
It's my pleasure : )
@itachi99887 Жыл бұрын
Do you have any video on how to sort tuple inside list . For eg [(as,1),(cs,2),(bs,6)] how to sort the key value in ascending order. If you have please give the link . Thank you
@HarshRaj-bm9eg6 жыл бұрын
thank you very much for making such a very beautiful video based on python
@AmulsAcademy6 жыл бұрын
Thank you:) Keep Learning
@sanketh7684 жыл бұрын
Thanks for the video. But had 1 doubt which is still unclear def sortbysec(element):# accepts list as a parameter or argument return element[1] list=[(1,16),(1,2),(2,5)] list.sort(key=sortbysec)# my doubt is sort by sec is not taking any parameter as per the signature of this function. # we are not passing any argument to the sortbysec function i mean list2=sortbysec(list) # passing list as arguments Would greatly appreciate your help
@AmulsAcademy4 жыл бұрын
No need to pass any parameter to key function :) You are calling list.sort(key) so whatever you will do with sort() will apply on list. :)
@sanketh7684 жыл бұрын
@@AmulsAcademy Thank you for the response
@saumyachaudhary39834 жыл бұрын
very good explanation
@AmulsAcademy4 жыл бұрын
Thank you :)
@spark5616 жыл бұрын
This is a great video and more useful for us
@AmulsAcademy6 жыл бұрын
Thank you :)
@spark5616 жыл бұрын
@@AmulsAcademy well come
@gouthamrajesh27454 жыл бұрын
Helped me in python project
@AmulsAcademy4 жыл бұрын
Glad to hear that :)
@belalibrahim38125 жыл бұрын
Its soo helpful 😊
@AmulsAcademy5 жыл бұрын
Thank you :)
@miftahshidqirabbani64894 жыл бұрын
Thanks dude. You helped me to get out of this :)
@AmulsAcademy4 жыл бұрын
Glad to hear that :)
@debojitmandal86703 жыл бұрын
Mam can you sort length of a string and pritn the longest word
@AmulsAcademy3 жыл бұрын
We can try :)
@gauravpatil79773 жыл бұрын
how come index of second element is one in nested list? it should be element[0][1], shouldn't it ?
@AkashSingha5 жыл бұрын
Thank you very Much mam it helps me a lot.
@AmulsAcademy5 жыл бұрын
Pleasure :)
@HarshRaj-bm9eg6 жыл бұрын
mam one more thing i want to say to you is that can you tell me that from where can i get questions based on python for beginners as i am new to program. this is the first time i am learning any language and this is the python
@AmulsAcademy6 жыл бұрын
google it, you can start with basic programs:)
@allenjr49783 жыл бұрын
The best ever
@AmulsAcademy3 жыл бұрын
Thank you 😊
@swethamk59253 жыл бұрын
How to get a list input.. Like this [1,2,3,4] as an input and print it like [4,3,2,1]
@AmulsAcademy3 жыл бұрын
You want to reverse the list or want to sort?
@swethamk59253 жыл бұрын
I want to reverse the list
@AmulsAcademy3 жыл бұрын
list1.sort(reverse=True)
@mominumar33886 жыл бұрын
How can we sort a list containing numbers as well as characters??
@AmulsAcademy6 жыл бұрын
In python 3 it will give error But you can separately sort characters and numbers then you can append it to list. c = ['s', 'a',2 , 'j', 9, 'e', 11, 't', 'k', 12, 'q'] c = sorted([i for i in c if not str(i).isdigit()]) + sorted([i for i in c if str(i).isdigit()]) print(c) :)
@1mol8313 жыл бұрын
Thanks, though I still want to learn how I could sort by frequency. Without using a while loop with a dictionary..
@Sandeep09173 жыл бұрын
can u solve this by using for loop
@AmulsAcademy3 жыл бұрын
Give me the program, I will try :)
@charancharan24176 жыл бұрын
Hi mam Will you provide online training or classroom training for python....???? May I know if you are doing training
@AmulsAcademy6 жыл бұрын
No sorry:)
@bhagwatimehra47382 жыл бұрын
How to display a list in ascending and descending order using a str value
@vignesh3851 Жыл бұрын
Your voice is melted me 🥶
@tanmoysardar39086 жыл бұрын
maam i am Tanmoy have been waiting for u since last week plz maam its very urgent i want to study that python graphics part ...i have subscribed your channel and also downloaded all of your video ..please maam make that video
@AmulsAcademy6 жыл бұрын
Hi Sure. But i need some time:)
@tanmoysardar39086 жыл бұрын
maam kya aap bata sakti how much you need maam isliye bol raha hu ki ek project submit karna tha thoda help ho jata
@AmulsAcademy6 жыл бұрын
Project submit kab karna hai?? i need minimum 2 weeks. :)
@tanmoysardar39086 жыл бұрын
4th of July maam
@AmulsAcademy6 жыл бұрын
Ohhh...I guess i can't upload so early:)
@Aivin4 жыл бұрын
helpful helpful helpful did i forget to say helpful?
@AmulsAcademy4 жыл бұрын
Thank you :)
@patelhardik25054 жыл бұрын
thank you.
@AmulsAcademy4 жыл бұрын
Welcome :)
@Sanjaykumar-xr8rz5 жыл бұрын
without function use kiye kro list ko assending order main
@AmulsAcademy5 жыл бұрын
You mean to say without built_in functions ?
@tanaymajumder92205 жыл бұрын
Amuls Academy please guide me to do without using sort function
@deepuvarma94596 жыл бұрын
good one
@AmulsAcademy6 жыл бұрын
Thank you:)
@maltesh105joshi Жыл бұрын
I have xml and i can sort within first child only. but it will through an error when the line have commented in my 1st child. it works fine if there is NO comments. can you help me here CODE root = tree.getroot() for c in root: c[:] = sorted(c, key=lambda child: (child.tag,child.get('name'))) xmlstr = ET.tostring(root, encoding="utf-8", method="xml") print(xmlstr.decode("utf-8")) ERROR c[:] = sorted(c, key=lambda child: (child.tag,child.get('name'))) TypeError: '
@abhishekpathak94544 жыл бұрын
Hllw mam my question is that how to get sum of sub list..?? Tell me plzz😓
@Aivin4 жыл бұрын
sum(list[sublist]) i think
@madras.mp4243 жыл бұрын
Where the without using built in function ?
@charancharan24176 жыл бұрын
Hi Please upload Django course for freshers
@AmulsAcademy6 жыл бұрын
For now i can't. But will do tutorials on django:)
@mathemediaworld97115 жыл бұрын
Without using any build dunction
@AmulsAcademy5 жыл бұрын
You can use selection sort or other sorting algorithms for that :)
@subrinalazad32154 жыл бұрын
Thank you
@sigdyxc26583 жыл бұрын
I like your voice
@Ganga_BE2 жыл бұрын
Sis. Input=1234, output=10203040 I want this program sis