We're a place where coders share, stay up-to-date and grow their careers.
Any Python version 2.7+.
>>> MiXeD = lambda s: ''.join(x.upper() if i&1==m else x for m in (0,1) for i, x in enumerate(s+' ')).split() >>> MiXeD('abcdef') ['AbCdEf', 'aBcDeF']
😳 😱
This is the magic of python. Short. I just love it. 💗
Any Python version 2.7+.
😳 😱
This is the magic of python. Short. I just love it. 💗