I'm trying to make a program that will convert any text into a different form. That means that a text such as 'hi there' becomes 'hI tHeRe'.
list = []
word = input('Enter in a word or a sentence! ')
for num in range(len(word)):
    list.clear()
    list.append('i')
    letter = word[num]
    for x in range(len(list)):
        if x % 2 == 0:
            i = word.index(letter)
            place = letter.lower()
            word = word.replace(word[i], place)
        if not x % 2 == 0:
            i = word.index(letter)
            place = letter.upper()
            word = word.replace(word[i], place)
print(word)
However, when I run the code it just prints the same string as normal.
 
     
     
     
    