I want to randomly capitalize a letter in a string but it doesn't seem to work. I think the problem is how i'm accessing and capitalizing a letter, but i don't know any other way.
I've tried using many other answers for this question, but i could not understand their methods (i'm still pretty new) and when i tried implementing it to my code it did not work.
import random
def random_cap(word):
for i in range(len(word)):
rn = random.randint(0,1)
if rn == 1:
word[i].upper
rn = random.randint(0,1)
print(word)
word = input("Type word to randomly capitalize: " )
random_cap(word)