List sort() ke like value a[] x=int(int(Enter the max size)) For I in range (x): Val= int(input("Enter value")) a.append() a.sot() Print(a) Output screen Max size=5 Enter value:54 Enter value:-7 Enter value:08 Enter value:3 Enter value:6 Answer Sorted list [54,08,6,3,-7]
It's not like that , print('Thank you' * 100000000) and don't use terminator , yay i understand you want to show your comment in smart way but it must be correct might be normal english or coding thanks
Hi sir...I am one of your subscriber ....I have a quiet personal question...😅...... Are you a full time youtuber or you have any programming job also ?? ......
Sir if at 16:57 we want to index of 2 which is appearing twice in the list then what will be the index ? Will it give the index of first occurrence or what?
You have used string as input Binary me 10 ko wo as 1 lelega or 0 ko ignore kar dega to while sorting in place of 10 only ascii value 49 will b counted
Hi Assalamualaikum I am from Bangladesh. I would like to do a online python course under you. Though, I am completing your playlists. Do I have any scope. Thanks.
16:3316:33 Jab hum ny list.sort() ka hai list ma jo hum ny value enter ke hai value single quotation (' ') ma lihka thy [ '5','2','10','2','1'] Is ly jab hum ny is list ko sort ka is ka answer ya aya hai [ '1','10','2','2','5'] List ko single quotation ma likhana sa hi 10 value before aya hai Agr hum is ko without single quotation (' ')ma lihkata hai 10 value after ma atai hai
I have tried above program in jupyter but getting wrong output plz chk a=[] x=int(input("enter max size:")) for i in range(x): val=input("enter number:") a.append(val) print("original list is:",a) print("length of the list:",len(a)) print("max value in list:",max(a)) print("max value in list:",min(a)) Output enter max size:5 enter number:23,34,33,44,21 original list is: ['23,34,33,44,21'] length of the list: 1 max value in list: 23,34,33,44,21 max value in list: 23,34,33,44,21
@@swarnikarout3824 You have replied answer of any question I might have asked in the video. Since the video an old one, I forgot, what question I had asked?
The best one sir jee.. Love the way u teach sir..
:)
values in list are of string datatype. To sort according to integers, use key = int inside sort function
i.e. a.sort(key=int)
👍🏻👍🏻👍🏻👍🏻
Brilliant way to explain. Thanks a ton for clear concept...
Thanks Anup!
Next level stuff sir...
Thanks punam. Keep supporting..
Sir aap simple way me bhut aacha samjhate hai 🙏🙏
Thanks for the complement dear !🙂
Sir numeric number sort ho jayega input me int type ka value denge to sorting ho jayegi abhi is program ne string le raha haii thank you
Very useful video sir
Thanks sir for your best effort..
Thanks & most welcome😊
List sort() ke like value
a[]
x=int(int(Enter the max size))
For I in range (x):
Val= int(input("Enter value"))
a.append()
a.sot()
Print(a)
Output screen
Max size=5
Enter value:54
Enter value:-7
Enter value:08
Enter value:3
Enter value:6
Answer
Sorted list
[54,08,6,3,-7]
Sir only because Of you I will clear my exams
Print("Thankyou *1000000") ;
It's not like that ,
print('Thank you' * 100000000)
and don't use terminator , yay i understand you want to show your comment in smart way but it must be correct might be normal english or coding thanks
Thank u very much for your content
May your channel grow more than u thought.
Godspeed.
Thanks & most welcome dear😊
print("Anand sir is best teacher for python")
print("Thank you .....")
So nice of you🙂
Sir kyunki list kaa ek ek element String k format mein hai. Agar properly sorting karna ho toh pehle Ek ek element ko int mein convert kare.
Sir g yr way of teaching is osm..Tx for explain all functions in 1 vid....My prob is solve now..Tx agn Sir g..
Most Welcome Ajay !
Awesome stuff..
Thanks rajesh!
Hi sir...I am one of your subscriber ....I have a quiet personal question...😅...... Are you a full time youtuber or you have any programming job also ?? ......
Thank u so much sir for bringing this type of helpful video for us.☺️
sorting k tym list m di gye objects k first character ko sort krta h....esliye 10 ka index list m 1st tha.
100 Times Thank You 🙏Sir
100 Times Welcome !
Sir aise hi ek cloud/devops ka full playlist provide kar dete to humare jaise ladko ka bahut help ho jata .🙏🙏
The reason, Sort is not work is "we give the value in string. If we want to sort proper then we have to add int before the input".
Very nice work sir
Thanks a lot Archana!
Superb sir ji...
Thanks Girish!
Sir if at 16:57 we want to index of 2 which is appearing twice in the list then what will be the index ? Will it give the index of first occurrence or what?
First occurance
the input entry is not integer,i.e. y=int(input()) then sorting will be right
Superab
🙂
Underrated 💘
Today i found your channel obviously coz of exams but i must say your explanation is best
Thanks dear, keep learning😊
Sir thanks alot . 🙏
Thanks sir g
Most welcome Faizal!
sir there is a runtime error is while sorting was performed if we run the program again it will show the correct result
Hello Sir, can you plz make a video on using all these functions with string?
Thank you
Try to create by your own and paste here, I will make changes/corrections if required.
@@codeitup okay Sir, thank you
completed watching 72 videos
Wow...
You have used string as input
Binary me 10 ko wo as 1 lelega or 0 ko ignore kar dega to while sorting in place of 10 only ascii value 49 will b counted
@preetikesherwani can you please explain🙏🙏
Sorting will b done on the basis of ascii codes, 0-9 hi digits k hote hai (48-57)
ty
Sir Maine last tak dekhi video par aapke question ka answer mujhe nahi pata.. Pls next video me answer bata dijiega...
Will Let you know very soon. :)
Use int function to sort
Because input in form of string liye he n unko int me type cast nhi kiya hai....
because sir you havn't taken val as integer type that's why sorting is not done properly..
Hi
Assalamualaikum
I am from Bangladesh. I would like to do a online python course under you. Though, I am completing your playlists. Do I have any scope.
Thanks.
Please mail to codeitupofficial@gmail.com!
sir i think you forgot to add sort function video in your youtube python playlist
because The Elements in the list are Strings Not int
18:42 these are strings not numbers we should have converted the stars to ints
16:33 16:33 Jab hum ny list.sort() ka hai list ma jo hum ny value enter ke hai value single quotation (' ') ma lihka thy [ '5','2','10','2','1']
Is ly jab hum ny is list ko sort ka is ka answer ya aya hai [ '1','10','2','2','5']
List ko single quotation ma likhana sa hi 10 value before aya hai
Agr hum is ko without single quotation (' ')ma lihkata hai 10 value after ma atai hai
Sir is ka jaldi reply dyna ya answer sai hai or nhi
Ma ap ka message ka wait kor gai 😊
in sort it comes sorted not sort so the
line is
a=(1,5,4,6,2,1)
print("after sort:", sorted(a)
output:
after sort: (1,1,2,4,5,6)
Sorting was not done properly because items of list are of string type
🔥🔥
Kyuki sare elements string hai int ya double nahi.
I have tried above program in jupyter but getting wrong output plz chk
a=[]
x=int(input("enter max size:"))
for i in range(x):
val=input("enter number:")
a.append(val)
print("original list is:",a)
print("length of the list:",len(a))
print("max value in list:",max(a))
print("max value in list:",min(a))
Output
enter max size:5
enter number:23,34,33,44,21
original list is: ['23,34,33,44,21']
length of the list: 1
max value in list: 23,34,33,44,21
max value in list: 23,34,33,44,21
bcz you have not mention the integer datatype at value before input it should be like this.
value=int(input('enter the values'))
Maybe 10 jo h vo string h ishiliye
List ko input krte tym int use nhi kra to usne numbers ko as a string liya hoga syd 😅....
Sir list sort wala nhi hai
Kynki humne 10 insert karvaya tha
Sir 10 ko pehle isliye likha kyoki vo '10" ko ek string ki treh le rha hai....kyoki aapne program mein int() ka use nhi kiya hai.....
Kyuki sir 2 do baar repeat Ho raha hai us list me isiliye usko bad me kiya hoga shayad
Wrong Rahul. Try again!
@@codeitupanswer kab bataoge sir
Bcz sir sort kon int mentioned nahi kiya hai
Abhi main practice kr rha tha to mujhe oata chala😀
Sir sort() ko call nhi Kiya only a likha huaa hai
Because..we can add upto 5 max size as we have given input..
& 10>5
So not possible
What was the question exactly??😜
@@codeitup 🙄🙄🙄means
@@swarnikarout3824 You have replied answer of any question I might have asked in the video. Since the video an old one, I forgot, what question I had asked?
@@codeitup ooooo
😊😊I got it
Is this right answer??
@codeitup sir...a.sort..after that we have to print original list is then print a and then print(after sorting)....
Nit int value its string value so error
can uh please share your pdf please
Sir sort wali video ni hai
Bilkul hai ! Chekc the playlist !
Not an int
sir sort( ) is not in the playlist
Yes, might be I forgot to add.