def remove_odd_indexed_chars(input_string):
"""
Remove characters at odd indices from the input string.
Args:
input_string (str): The string to process.
Returns:
str: A new string with characters at odd indices removed.
"""
return input_string[::2]
if __name__ == "__main__":
input_string = input("Enter a string: ")
result = remove_odd_indexed_chars(input_string)
print("String after removing odd indexed characters:", result)
#source code --> clcoding.com
0 Comments:
Post a Comment