fork download
  1. import re
  2. def to_weird_case(string):
  3. return re.sub(r'(\S)(\S?)', lambda m: "{0}{1}".format(m.group(1).upper(), m.group(2)), string);
  4. print to_weird_case('what do you mean')
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
WhAt Do YoU MeAn