On Tue, Mar 9, 2010 at 10:31 AM, Rafik Ouerchefani <rouerchef...@gmail.com>wrote:
> Hello, > > 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. > > Any magic command for this ? :-) > > Examples of codes : > 3cmvA > 3cmvB > 3cmvC > 3cmwA > 1g18A > 2g88A > 1mo4A > 2odwA > 1u94A > 1xmvA > 1xp8A > 2zr9A > > Thanks a lot ! > > a+ > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > What about indexing part1 = word[:4] part2 = word[4] -- لا أعرف مظلوما تواطأ الناس علي هضمه ولا زهدوا في إنصافه كالحقيقة.....محمد الغزالي "No victim has ever been more repressed and alienated than the truth" Emad Soliman Nawfal Indiana University, Bloomington --------------------------------------------------------
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor