1string = 'abcdefghi'
2
3# Removing the 3rd idx:
4
5#-----------------------------------
6# Method 1:
7#-----------------------------------
8
9arr = list(string)
10
11arr.pop(3)
12
13string = ''.join(arr)
14
15# string is now => 'abcefghi'
16
17#-----------------------------------
18# Method 2:
19#-----------------------------------
20
21string = string[:3] + string[4:]
22# string[:idx_to_remove] + string[idx_to_remove_plus_1:]
23
24# string is now => 'abcefghi'
25