Hello everyone! I would like to ask you two questions regarding strings which I do not know. Excuse me in advance if the questions may seem a bit dumb. I&#39;m a beginner. So let&#39;s get back to the point, this is my string:<br>
<br>msg= &#39;Hello world&#39;<br>If I do, msg[:3] I get the following output, &#39;Hel&#39;<br>If I do, msg[6:] I get the following output, &#39;World&#39;<br>Ok, so I understand why this is happening. What I do not understand is why I get the following output in this cases.<br>
<br><br>1) msg[:-1] which has the output &#39;Hello Worl&#39;<br>2) msg[0:6:2]  &#39;Hlo&#39;<br>3) msg[::-1] &#39;dlroW olleH&#39; <br><br>Can someone please explain this to me? Thank you so much and I wish everyone a great day!<br>