Skip to content

Commit abface1

Browse files
author
meshmote
committed
debugged list add/append statements
1 parent 715bd80 commit abface1

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
basket = ["Apples", "Pears", "Oranges", "Paches"]
1+
basket = ["Apples", "Pears", "Oranges", "Peaches"]
22
print basket
33
new_fruit = raw_input('Type in the name of another fruit-->')
44
fruit = str(new_fruit)
55
basket.append(fruit)
66
print basket
77
fruit_index = raw_input("Type in the fruit index-->")
88
index = int(fruit_index)
9-
print fruit_index +': ' + basket[index-1]
9+
print fruit_index + ': ' + basket[index-1]
1010
new_fruit = raw_input("Type in the name of another fruit-->")
1111
fruit = str(new_fruit)
12-
basket = fruit + basket
12+
basket = [fruit] + basket
13+
print basket
14+
new_fruit = raw_input("Type in the name of another fruit-->")
15+
fruit = str(new_fruit)
16+
basket.insert(0, fruit)
1317
print basket

0 commit comments

Comments
 (0)