a = int(input("Enter a number you want to connect: ")) b = input("Enter the input string: ") c = int(input("Enter the position at which integer is combined with string: ")) if 0 <= c <= len(b): result = b[:c] +" "+ str(a) +" "+ b[c:] else: result = "Position is out of range." print(f"After combining the given integer and string\nThe output is: {result}")