This example will teach us how to delete characters of a specified location from a non-empty string in Python.
Source Code
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
str = input("Please input the string: ")
n = int(input("Please input the index to be deleted: "))
first = str[0:n]
last = str[n+1:]
newStr = first + last
print("New string is: ", newStr)
Output:
Please input the string: Hello World
Please input the index to be deleted: 4
New string is: Hell World