input: Write a python function to convert a string to alternating case where even indexed characters are uppercase and odd indexed characters are lowercase.
  assert alternatingCase("hello") == "HeLlO"
  assert alternatingCase("world") == "WoRlD"
  assert alternatingCase("python") == "PyThOn"
  assert alternatingCase("a") == "A"
  assert alternatingCase("") == ""
output: def alternatingCase(s):
      return ''.join(c.upper() if i % 2 == 0 else c.lower() for i, c in enumerate(s))