Python Program to remove the middle element of a string which is got from the user and replacing the first element with that middle element
A String is given as an input and the middle element of a string is found. The middle element is identified by performing floor division to the length of the string. For an unequal string length, the element which is close to the centre is taken as the middle element. The next step is replacing the first element with the identified middle element. The output string is displayed with the first letter altered. This program works for both lowercase and uppercase characters.
Submitted by VenkatNarayan.K (venkat07)
Download packets of source code on Coders Packet
Comments