I love all your tutorials. I see often in the comments some smart code which for a beginner like myself means nothing- maybe,will be valuable in the future, but your tutorials are in depth which drives in my understanding of the programming concepts. Please keep doing what you are doing. Bless you.
@AmulsAcademy4 жыл бұрын
Thank you so much :}
@uday23396 жыл бұрын
n =("amuls") n1=(n[::-1]) print(n1)
@hemantprasad10185 жыл бұрын
there are 5 ways to reverse a string in Python
@marioshusband37004 жыл бұрын
what does the (n[::-1]) mean? I barely learned python.
@40melcolmvaz553 ай бұрын
@@marioshusband3700 go check slicing of index of a string tutorial.
@Goshbello-Money-AI-Tutorials6 жыл бұрын
Thank you again for another well explained tutorial. It’s not just the method you used to solve the problem but I have gained a better understanding with FOR LOOP watching this video. You’re a great teacher. I am waiting for your next video. Thank you
@AmulsAcademy6 жыл бұрын
Thank you so much :)
@suyash7450 Жыл бұрын
I have'nt seen anyone explaining concepts so deeply as you do , It makes learning very easy thanks mam for your efforts
@a42h6 жыл бұрын
Thank you this was very helpful! I like how you went into details of the for loop and explained the logic of it.
@AmulsAcademy6 жыл бұрын
Thank you:)
@FI3RZE_PATRIOT5 жыл бұрын
@@AmulsAcademy GREAT VIDEO AND WELL EXPLAINED!!!
@vidithnarayana23464 жыл бұрын
@@AmulsAcademy python code to reverse a string without effecting special characters?(Input: ab,c,d)(output:dc,b,a) please reply
@romantrenton36443 жыл бұрын
You all probably dont give a damn but does any of you know of a method to get back into an Instagram account? I somehow lost my account password. I appreciate any tricks you can offer me.
@hunterjamal69703 жыл бұрын
@Roman Trenton Instablaster =)
@kapishsingh6 жыл бұрын
def reverse(y): for i in range (1,1+len(y)): print(y[-i],end='') reverse("amulse")
@00xess4 жыл бұрын
why the hell did you pass in 1 at the first place, just use range(len(y)) lmao
@panagiotisgoulas85394 жыл бұрын
@@00xess If he did that he would have to print(y[-i - 1], end=''). First index is 0 but last is -1
@thesumitkumar03 жыл бұрын
#run_this print(input()[-1::-1])
@kapishsingh3 жыл бұрын
@@thesumitkumar0 you can ignore -1 in beginning
@SB-fs4vi4 жыл бұрын
You are really a very good teacher with clear concept. All your videos are helping me a lot as a beginner. Thank you so much🙏🏻
@AmulsAcademy4 жыл бұрын
Glad to hear that :)
@ramchandrakulkarni59173 жыл бұрын
Great Explaination, I was stucked at working of the for loop. But now it is clear. Thank You.
@gamingengineer3604 жыл бұрын
now thats what I call explanation. a k.g. boy can understand the program. thanq mam.
@AmulsAcademy4 жыл бұрын
Thank you :)
@lokakshaiathibans4844 жыл бұрын
Nice and clear explanation. How to print this sequence: Input : A B C D Output : Z Y X W
@AmulsAcademy4 жыл бұрын
Try this: n = input("Enter number of elements : ") k=65 list1 = n.split() for i in range(len(list1)): c = ord(list1[i])-k h = 25-c+k print(chr(h))
@davidusharauli22276 жыл бұрын
How this code reverses the input string? It works but I am not sure if I understood the mechanics of it. Can you explain a little bit more.
@AmulsAcademy6 жыл бұрын
def reverse(string): reversed_string = "" for i in string: reversed_string = i + reversed_string print("reversed string is:",reversed_string) string = input("enter the string:") print("entered string is:",string) reverse(string) Here first , string = input("enter the string") will be executed, so you need to enter the input, if you enter "amuls" this string will be stored in variable string Next it will execute , print("entered string is:",string) so it will print entered string to the output screen. Next it will execute function call that is, reverse (string) so now control goes to the reverse function definition, so it will execute that function. def reverse(string) here string is the input that is "amuls", next we will take one variable and we assign empty string to that. reversed_string = "" here reversed_string is a variable which will hold final output. next for loop, for i in string: reversed_string = i + reversed_string so here string is "amuls", so initially variable i value will be 'a', so it will execute for loop body , reversed_string = i + reversed_string here we are doing string concatenation, symbol + is used for concatenation of strings. reversed_string is initially empty string and i value is 'a' so it will concatenate 'a'and empty string, so we will get reversed_string as 'a' that is, reversed_string = i + reversed_string = 'a' + "" = 'a' next again control goes to for loop, now i value becomes 'm', it will execute for loop body, reversed_string = i + reversed_string = 'm' + 'a' = "ma" in this same way it will continue the execution:)
@Amit-nh2pu6 жыл бұрын
great!
@vengateshprasath29066 жыл бұрын
Str="David" str[::-1]
@melissahuerta83154 жыл бұрын
thanks for the explanation, at first I was confused too.. reading the string as it was an array like str[I] and in my mind it got the same order.. but now is clear :)
@sultanahmadsabawoon60304 жыл бұрын
still confused. make the code as reversed_string + i. in this case it will give you the same string as entered initially. the trick is that the i value is cancatenated with reversed string not the other way around.
@klaskycsupo1214 жыл бұрын
So chars are going to be concatenated from right to left? Did I get this right?
@riuspablo6 жыл бұрын
Or >>> string = "amuls" >>> string[::-1]
@bagavathi53404 жыл бұрын
it's a simple method
@vortex_75744 жыл бұрын
Genius!
@vimukthiaravinda62884 жыл бұрын
this is the right method
@jenre69034 жыл бұрын
you just saved me 8 minutes. thank you, you are a legend
@soulfulman48343 жыл бұрын
This is inbuilt method which I use oftenly but it doesn't works in complex programs...
@shahsikalagowda183 Жыл бұрын
Too good mam🤍...ur voice next level🙌🏻😇.. understood clearly 😍🥰
@sayanmukherjee77263 жыл бұрын
A great explained video, very useful for me for better understanding of for loop iteration. Thank you.
@raheemabdul44104 жыл бұрын
U seem kannadiga from Bangalore..lots of wishes from mangalore
@Darsky4 жыл бұрын
Finally! Simple, yet detailed!! Thank you!
@puria77112 жыл бұрын
thank you! i was having a hard time understanding this concept, i really appreciate it! 😀
@rajlaxmijoshi87412 жыл бұрын
Nice explanation, amazing teacher you are 💓
@moonnyy3645 жыл бұрын
This video helped me so much! Thank you!
@AmulsAcademy5 жыл бұрын
Pleasure :)
@sambhavsisodia39206 жыл бұрын
l,m,n = yell,yem,yen 😂😂😂 ,whatever video was great !
@AmulsAcademy6 жыл бұрын
Thank you:)
@MuhammadNaeem-xj8zp4 жыл бұрын
Yeh it should be el, am ,an for l, m , n any ways great explanation nice voice
@rb89344 жыл бұрын
the pronunciation differs as per the state
@soumyashreebiswal143 жыл бұрын
@@MuhammadNaeem-xj8zp Its not about whether it SHOULD BE or whatever. Its totally okay to have a different pronounciation.
@chandanshivalingaiah98613 жыл бұрын
Nobodys perfect summbbbhaaavvvvvvvaaa ssuuusssoooddiiiaaaaa so please watch it or get out nobody wants you here anyway
@mukundmohare3102 жыл бұрын
excellent explanation Ma'am keep it up and keep growing.👍👍👍
@kushi54395 жыл бұрын
thank you very much ma'am ......very easy way of explanation u had given here.....thanks a lot :) looking many more python videos from you
@AmulsAcademy5 жыл бұрын
Thank you :)
@shreyanshmishra32785 жыл бұрын
Superb Explanation!!!
@learngurututorials88375 жыл бұрын
Awesome .. explanation.. i really appreciate you.. 👌👌👌
@AmulsAcademy5 жыл бұрын
Thank you :)
@kishoredev60045 жыл бұрын
def rev(x): return x[::-1] rev('forward')
@gamerjmax55683 жыл бұрын
x = input("Enter any name: ") x[::-1]
@takerixgaming4170 Жыл бұрын
Magnetic voice mam🔥🔥🔥
@NewIndianera6 жыл бұрын
Mam please make a video on ...Any program how it is executed
@pavanboggarapu48426 жыл бұрын
way of explanation is too good thank you soo much
@AmulsAcademy5 жыл бұрын
My Pleasure :)
@balakarna_editz27795 жыл бұрын
Nice explanation, please upload python data science videos
@paramvirsohi59223 жыл бұрын
Perfect explanation for interview
@dabhijaydeep3 жыл бұрын
Can u make decorator using reverse number and also negative number and also string enter to string reverse in single function
@AmulsAcademy3 жыл бұрын
Will try 😊
@praveentiwari56725 жыл бұрын
thanks for explaining everything clearly .........thanks a lot........
@AmulsAcademy5 жыл бұрын
My Pleasure :)
@abuawaish73 жыл бұрын
Great explanation mam👍❤️
@AmulsAcademy3 жыл бұрын
Thank you :)
@manproactive66493 жыл бұрын
wonderful! how is crystal clear explanation! very helpful for beginners like for me
@AmulsAcademy3 жыл бұрын
Thank you 😊
@NewIndianera6 жыл бұрын
Mam make video on c++ and html and core and advance java
@Tripti3434 Жыл бұрын
amazing explanation till now superb
@RazaviImran5 жыл бұрын
This video is nice, i saw your 4 videos today. But this is great, nice explanation. If you able to make video in hindi it will great opportunity for hindi people just like me, i am not good in english
@AmulsAcademy5 жыл бұрын
I will start the Hindi channel soon :)
@phaniinakollu46044 жыл бұрын
@@AmulsAcademy explain django ecommerce website
@amitabhgupta215 жыл бұрын
You are very good and your way is best,keep it up
@AmulsAcademy5 жыл бұрын
Thank you :)
@mayank_83482 жыл бұрын
It was a great explanation ma'am
@ralphmachado82015 жыл бұрын
hi i learn a lot from your videos and check my below code which is more simply than the above one. print("enter anything to be reversed") x=input() length=len(x) for i in range(length-1,-1,-1): print(x[i],end="")
@PassionateSaksham4 жыл бұрын
What the Meaning Of -1,-1,-1 Here Please Answer Me
@ralphmachado82014 жыл бұрын
@@PassionateSaksham 1: length-1 means that the for loop will start from the index number which is one less than the length of the string to be reversed 2: -1 is the number untill which the for loop will run 3: -1 is the amount which will be decremented after every iteration and this will continue until the number reaches till -1.
@katsukibakugou62163 жыл бұрын
thank you so much! please make more videos like this its really helping!
@AmulsAcademy3 жыл бұрын
Pleasure 😊
@Ink_Sack4 жыл бұрын
Very helpful and easy to understand. Thank you
@AmulsAcademy4 жыл бұрын
Glad it was helpful!
@SPD360ENGLISH3 жыл бұрын
Very good and neat explanation... Well done...
@harik19996 жыл бұрын
Hello Ma'am,I have started watching your Python programming videos and the sessions were really helpful as you did explained in a nicely manner. Is it possible to navigate all your videos (the concepts + sample program's) please? Also,let me know if any materials are available and then I can take as well if they are chargable?
@AmulsAcademy6 жыл бұрын
Sorry I don't have any materials :)
@ASHGaming-yp9vj3 жыл бұрын
Really great explanation 🙌
@kartheekarun20302 жыл бұрын
thanks for the explanation at the end it was very helpful.
@shambhushrestha69264 жыл бұрын
love the way you teach
@AmulsAcademy4 жыл бұрын
Thank you :)
@smhproductions2959 ай бұрын
Feels super easy after seeing this
@sureshcement2212 Жыл бұрын
I just love ur videos buddy
@someone-x645 жыл бұрын
Thankyou : For detailed explanation 😊
@AmulsAcademy5 жыл бұрын
Pleasure :)
@sujithnair2324 жыл бұрын
Really good explanation, Thank you
@AmulsAcademy4 жыл бұрын
Glad it was helpful! :)
@5151sunil6 жыл бұрын
Nice explanation.. Thanks..
@AmulsAcademy6 жыл бұрын
My Pleasure:)
@ajinkyarajurkar74576 жыл бұрын
can u upload a video on "reverse" which is used everywhere in python like list and reverse operation on some other.. . . like reversing a list kind of
@AmulsAcademy6 жыл бұрын
Are you asking about the list.reverse method?
@shruthi97766 жыл бұрын
Fabulous keep going i loved u programmes vry helpful especially during exams😁👍👍👍👏👏👏👏
@AmulsAcademy6 жыл бұрын
Thank you:)
@Tech_Brigadier2 жыл бұрын
Grate Tutorials, But mam when I was learning python functions I was taught not to use print statements in a function or else the user's rights to edit the returned value will end up
@davidusharauli22276 жыл бұрын
Thanks for reply. but why would for loop add m before a like m+a and not standard way a+m? this part is main part and your reply did not make it clear. if one puts 'amuls'[::-1] it makes sense to reverse. But why would x = i+var should loop from left to write rather than from right to left?
@AmulsAcademy6 жыл бұрын
hey, In the string concatenation, 'a' + 'm' is 'am' 'm' + 'a' is 'ma' for i in string: reversed_string = i +reversed_string here string is amuls, so first i value becomes 'a' so for loop executes for i='a', so , reversed_string = i +reversed_string [ here, = 'a' + "" = 'a' [ i = 'a' [ reversed-string = '"" [ empty string ] Now reversed_string is 'a' so next i value becomes 'm' reversed_string = i +reversed_string = 'm' + 'a' ='ma' so reversed_string is 'ma' now. here we are doing, i+reversed_string so we get string is reversed order, that is 'sluma' if we write, reversed_string + i we will get the same string, that is "amuls" :)
@davidusharauli22276 жыл бұрын
Thanks. I got it now. very nice.
@tusharkhatri57952 жыл бұрын
can function name be any keyword here you have written as reverse which i think is reserved word . Pls explain as code is executing
@hemamanohar152 жыл бұрын
hi do you have any video about reversal string but in vertical way. i've tried so many ways but still no solution
@psiddamma10223 жыл бұрын
Thank you mam for clear explanation
@arfatbagwan482 жыл бұрын
thank you so much ma'am god bless you !
@qasemalharbi384 жыл бұрын
Great 👍 I love it please how can we solve it with recursion
@AmulsAcademy4 жыл бұрын
Try this: def reverse_string(s): if len(s) == 1: return s else: return reverse_string(s[1:]) + s[0] s = input("enter string:") print("The original string is : ",s) print ("The reversed string is : ",reverse_string(s))
@NewIndianera6 жыл бұрын
Mam make video for those who don't know anything about programing even ABCD of it
@drsmahesan2033 жыл бұрын
Pythonic way to reverse a string is to use the slice operator E.g. str1 = "Amuls" rev_str = str1[ : : -1] :-)
@LM-th7dj4 жыл бұрын
Thank you so much! That was very helpful!
@AmulsAcademy4 жыл бұрын
My Pleasure :)
@jitendranavagire33806 жыл бұрын
very good explanation
@AmulsAcademy5 жыл бұрын
Thank you :)
@rexrajan5232 Жыл бұрын
I think there is not necessary to include function def, For loop is enough to reverse the string. So what's your opinion?
@paramvirsohi59223 жыл бұрын
wow, waht an explanation. I wish I get this fot interview
@mohammedmujtabaahmed83373 жыл бұрын
Excellent video. Thanks@!
@AmulsAcademy3 жыл бұрын
Pleasure 😊
@AliRaza-lv2kf5 жыл бұрын
whose version use you are?
@sivapriya32764 жыл бұрын
thank you somuch for this wonderful vedio.how to reverse a word using recursion
@AmulsAcademy4 жыл бұрын
Thank you :) You can use string slicing method and write the program :)
@sivapriya32764 жыл бұрын
@@AmulsAcademy can you say the program
@swathiram11165 жыл бұрын
Hai mam but getting syntax error like unindent does not match any indentation level what to do pls explain
@AmulsAcademy5 жыл бұрын
I think you placed extra space before that statement.
@komaljaswani74975 жыл бұрын
Hi! Can you please make a video on the question: If a list in python has mix of strings & numbers, how will you make separate lists of strings & numbers? I saw ord() for getting ASCII code in python & chr() for converting ASCII codes to characters somewhere & tried to use them to get answer of this question but it did not work!! :(
@saikiran3074 жыл бұрын
Good Explanation
@AmulsAcademy4 жыл бұрын
Thank you :)
@jitendranavagire33806 жыл бұрын
thank you so much.. these is very helpful to me .
@AmulsAcademy5 жыл бұрын
My Pleasure :)
@abhaysrivastav56642 жыл бұрын
You constructed the solution in a more complicated way which can be solved with the easy loop system.
@saurav0316 жыл бұрын
can you please add an example of how to reverse words of a given string using for loop. for example given string is "amuls academy of python" and i want the result string as "python of academy amuls". there are many ways to do this using split() and join() method but I want to do this using for loop. Please add a video on this. Thanks
Amuls Academy Thanks for your answer but can you please explain the code or atleast make one video tutorial on this.
@venkatkrishnan8763 жыл бұрын
Well explained mam
@AmulsAcademy3 жыл бұрын
Thank you 😊
@sharathcg46973 жыл бұрын
clearly understood Thank you.....
@notmaku30395 жыл бұрын
Can we do this using while loop
@AmulsAcademy5 жыл бұрын
Yes we can :)
@moana77716 жыл бұрын
We can do this usnig list bcoz usnig def its very long process as u done in vdo
@AmulsAcademy5 жыл бұрын
Yes we can :)
@ananthvenkatreddygaddam30416 жыл бұрын
Hi I have written code like this but i am not able to be executing in python 2.x could you please help me def reverse(str): reversed_str="" for i in str: reversed_str= i+reversed_str print("reversed string is:",reversed_str) str=input("enter a string:") print ("entered string",str) reverse(str)
@AmulsAcademy6 жыл бұрын
Because you are using python 2, in the output: first a message will display that is, enter a string: here you need to enter string that is, "amuls" [ you need to write your input within the double quotes ] Because In python 3 input() by default treat input as string. But in python 2 input() will evaluate the input. OR you can write code like this: python 2's raw_input is equal to python 3's input() so instead of input() you can use raw_input() def reverse(str): reversed_str="" for i in str: reversed_str= i+reversed_str print "reversed string is:",reversed_str str = raw_input("enter a string:") print "entered string", str reverse(str) here you can enter input without double quotes:)
@ananthvenkatreddygaddam30416 жыл бұрын
Thank you so much!!!!!!!!!!!
@AmulsAcademy6 жыл бұрын
welcome:)
@sandeepsunny99053 жыл бұрын
Nice approach
@anilmacharla69393 жыл бұрын
A million Thanks!
@AmulsAcademy3 жыл бұрын
Pleasure 😊❤️
@davidusharauli22276 жыл бұрын
I meant why for loop goes from right to left (etc+m+a) rather than left to right (a+m+etc).
@AmulsAcademy6 жыл бұрын
for loop goes from left to right only. for i in "amuls": first here i value is 'a' in the next iteration 'm' next 'u' next 'l' next 's' In the for loop body we wrote, reversed_string = i+reversed_string that's why we will get reversed string. if we write , reversed-string = reversed_string +i then we won't get output in the reverse order.
@davidusharauli22276 жыл бұрын
thanks for taking so much time answering. once you said that switching places between i and var is all this code does, I understood it how simply it was.
@AmulsAcademy6 жыл бұрын
Welcome:)
@pslovelife66 жыл бұрын
@david Usharauli If you see the reversed_string input is i+ reversed_string, so once reversed_string stores the first letter, it calls the same letter in the given command and concatenates with the other letter which is i, hence it is going in reverse order (reading the output from right to left).
@GAURAV-xd1pi5 жыл бұрын
for all the idiots making fun of her pronunciation just don't watch the video, simple!
@abc705745 жыл бұрын
thanks for the help helped me lot
@AmulsAcademy5 жыл бұрын
Pleasure :)
@shankarrio28544 жыл бұрын
my python 3.8 compiler for 32 bit does not works
@AmulsAcademy4 жыл бұрын
What is the problem? Getting any error ?
@shankarrio28544 жыл бұрын
yaw i got Idle subprocess did not make connection error
@jumanjiwarlord5 жыл бұрын
Let’s say the word is Dog. On the first iteration, the D is stored in the empty list. Now on the second iteration, we pick up the o. And we add the o to the list... the list already contains D but the second iteration will be added BEFORE the list. Now we have oD... and so forth... goD. The trick is in the concatenation. i + reversed_string is like o + D. It’s only confusing because we read left to right and this logic is going against our natural tendencies. We just can’t grasp that o being placed BEFORE the D in a concatenated string unless you understand concatenation (and building strings through concatenation). I hope this helps somebody. We’re all at different levels. Some people have mentioned the [::-1] technique. Splicing a list, I believe it’s called? That’s probably the easier way.
@jumanjiwarlord5 жыл бұрын
Another thing, it doesn’t even have to be a word. After all, a computer doesn’t know what a Dog is. All it knows is characters. So instead of Dog, let’s use mZy. First iteration is m. m gets stored in an empty list. Second iteration is Z, then we add Z to the list to get Zm and so forth yZm. The point is we’re adding the characters BEFORE the stored list... as stated by i + reversed_string. That’s how it builds in reverse over the course of its iterations.
@NasirsCodeStudio5 жыл бұрын
Thanku.... Very helpful
@AmulsAcademy5 жыл бұрын
Pleasure :)
@manuchowdary78484 жыл бұрын
good explanation
@chandrashekharpatil90156 жыл бұрын
Nice explanation
@AmulsAcademy6 жыл бұрын
Thank you:)
@sunny14o4-2k6 жыл бұрын
wrd=input("Please enter a word") wrd=str(wrd) rvs=wrd[::-1] print(rvs) if wrd == rvs: print("This word is a palindrome") else: print("This word is not a palindrome") "could you explain this"
@AmulsAcademy6 жыл бұрын
This program is to reverse the entered string and to check whether it is palindrome or not. 1. wrd=input("Please enter a word") you are asking user to enter the string and it will be stored in variable wrd. 2. wrd=str(wrd) if you are using python 3 then no need to write this line. here you are converting entered input to string, but in python 3 by_default whatever the input you enter it will treat that as string. 3. rvs=wrd[::-1] here it will reverse the string. you are using slicing operation here . syntax of slicing is string_name[start:end:step] start - starting integer where the slicing of the object starts. stop - integer until which the slicing takes place. The slicing stops at index stop - 1. step - integer value which determines the increment between each index for slicing. In the above program you didn't mention start and end so it will take entire string. -1 is the step . So, when you do string_name[::-1] , it starts from the end, towards the first, taking each element. So it reverses the string. 4. print(rvs) you are printing the reversed output. 5. if wrd == rvs: print("This word is a palindrome") else: print("This word is not a palindrome") in this if else condition you are checking whether the entered string is palindrome or not. A string is said to be palindrome if reverse of the string is same as string. that's why we are checking wrd==rvs here wrd is the entered input or original string rvs is reversed string if both are same then the string is palindrome if not then not a palindrome. :)
@vijaysahal45564 жыл бұрын
nice 👍👍👍👍👍
@AmulsAcademy4 жыл бұрын
Thank you :)
@estevaofranca50093 жыл бұрын
Thanks for sharing this!!
@kareemsaheb54385 жыл бұрын
Good video mam
@AmulsAcademy5 жыл бұрын
Thank you :)
@VishalSoni-te7hy3 жыл бұрын
def reverse(name): print(len(name)) for i in range(len(name)-1,-1,-1): print(name[i],end="") reverse("Vishal")
@ilikemathematics15904 жыл бұрын
What I do is: String = ‘cool’ lst1=[] For x in string: lst1.append(x) String = “” For x in range(len(lst1)): String += lst1[-x]