forked from aiti-ghana-2012/Lab_Python_04
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lab04_3.txt
37 lines (24 loc) · 920 Bytes
/
Lab04_3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
print'Lab04_3'
print
print'-------------------------Lab04_3a-------------------------'
print
print'The data structure that best fits this data is the tuple data structure'
print'This is because the tuple is immutable, so it can be used to store items'
print'items that can be considered as static'
print
print'-------------------------Lab03_2b-------------------------'
print
always_in_stock = ('Apples','Bananas','Bread','Carrot','Champagne','Stawberries')
#print always_in_stock,
for i in always_in_stock:
print i,',',
print
print'-------------------------Lab03_2c-------------------------'
print
print'Since the the data structure is a tuple, we can use the concatenation operator'
print' For example'
always_in_stock1 = ('Apples','Bananas','Bread')
always_in_stock2 = ('Carrot','Champagne','Stawberries')
always_in_stock = always_in_stock1 + always_in_stock2
for i in always_in_stock:
print i,