This program is written in the Python programming language and it removes all characters from an input string that are at odd-numbered indices. It does this using a for loop and an if statement:
Finally, the program prints the original string "Computer Education" and the modified string "res" (which only includes characters from even-numbered indices) to the console.
str="Computer Education" res = "" print("Original String :",str) for i in range(len(str)): if i % 2 == 0: res = res + str[i] print("Remove Odd Index Char :",res)
Original String : Computer Education Remove Odd Index Char : Cmue dcto
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions