List inputed: ["a", "b", "c", "d", "e", "f", "g", "h"]
List expected: ["a", 99, "b", 99, "c", 99, "d", 99, "e", 99, "f", 99, "g", 99, "h"]
List actual: ["a", 99, "b", 99, "c", 99, "d", 99, "e", "f", "g", "h"]
Python code:
m_o = ["a", "b", "c", "d", "e", "f", "g", "h"]
m = ["a", "b", "c", "d", "e", "f", "g", "h"]
m_expected = ["a", 99, "b", 99, "c", 99, "d", 99, "e", 99, "f", 99, "g", 99, "h"]
num = 99
count = 0
m_l = range(len(m))
for i in m_l:
if i==(1+count):
m.insert(i, num)
count = count + 2
m_l = range(len(m))
#print("1+count : " + str(1+count))
#print(m)
#print("m_l: " + str(m_l))
print("List inputed: ")
print(m_o)
print("\nList expected: ")
print(m_expected)
print("\nList actual: ")
print(m)