I want to make insertion sorting algorithm that user can type elements. But I have error in line 4. Anyone can help me?

```
List = []
a = (raw_input("Enter your each element one by one(when the last element typed, press enter):"))
while a != " ":
List.append([a])
if a == " ":
break
def insertion_sort(list):
for index in range(1,len(list)):
value=list[index]
i=index -1
while i>=0:
if value<list[i]:
list[i+1]= list[i]
list[i]=value
i=i-1
else:
break
print insertion_sort(list)
```