Capitalise every other letter in a string in Python?

I’ve been trying to define a function that will capitalise every other letter and also take spaces into accout for example: print function_name(“Hello world”) should print “HeLlO wOrLd” rather than “HeLlO WoRlD” I hope this makes sense. Any help is appreciated. Thanks, Oli Answers: Thank you for visiting the Q&A section on Magenaut. Please note … Read more