python string - stachulemko/doc GitHub Wiki

Remove a character from string at specific index

strObj = "This is a sample string"

#Let’s remove the character at index 5 in above created string object i.e.
index = 5
# Slice string to remove character at index 5
if len(strObj) > index:
    strObj = strObj[0 : index : ] + strObj[index + 1 : :]

Output:
Modified String :  This s a sample string