# strings are immutable in Python,
# we have to create a new string which
# includes the value at the desired index
s = s[:index] + newstring + s[index + 1:]
## returns a matching string where every even letter is uppercase,
## and every odd letter is lowercase
def string_slicing(str_1):
length = len(str_1)
for x in range(0, length):
if x % 2 != 0:
str_1 = str_1[:x] + str_1[x].upper() + str_1[x+1:]
else:
str_1 = str_1[:x] + str_1[x].lower() + str_1[x+1:]
return str_1