<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hello,<div> </div><div>I'm trying to split 5 chars words (codes) into 2 variables. The first must contain the first 4 characters. The second variable will only contain the last character. I'm working in a loop pre-generated codes.</div>
<div><br></div><div>Any magic command for this ? :-)</div><div><br></div><div>Examples of codes :</div><div><div>3cmvA</div><div>3cmvB</div><div>3cmvC</div><div>3cmwA</div><div>1g18A</div><div>2g88A</div><div>1mo4A</div>
<div>
2odwA</div><div>1u94A</div><div>1xmvA</div><div>1xp8A</div><div>2zr9A</div><div><br></div><div>Thanks a lot !</div></div><div><br></div><div>a+</div></div></blockquote><div><br>Hmm...This sounds a bit like homework. Can you show us any code that you've already tried? Meantime, you might want to explore Python's slice syntax: <br>
<br><a href="http://docs.python.org/tutorial/introduction.html#strings">http://docs.python.org/tutorial/introduction.html#strings</a><br></div></div>