Please help me to use python to write this code and this pro
Please help me to use python to write this code, and this problem have a examle code, please only give me correct code, thanks.
Solution
def main(): inp_str = input().strip() str_length = len(inp_str) odd_string = \"\" even_string = \"\" list_array = list(inp_str) for x in range(0,len(list_array)): if x % 2 == 0: even_string = even_string + list_array[x] else: odd_string = odd_string + list_array[x] print(odd_string) resultant_string = even_string + \" \" + odd_string return resultant_string