I want to replace every second occurence of a character from only a string as input. Using only the .replace method.
For example:
input: asdasdasdasd
output should be: asdASDasdasd
def main(string):
for char in string:
string.replace(char, char.upper())
return string
Im relatively new to Python and I can't wrap my head around what to do.
replacereturns a new stringinput_1="aaa", what is the expectedoutput_1? Ifinput_2="aaaaaa", what is the expectedoutput_2?