x = [4, 6, 7, -3, 2]
n = len(x)
total = 0
for i in range(0,n):
total = total + x[i]
print('Sum of vector = ',total)
a = [4, 5.2, 'Car', [1,2,3]]
for i in a:
print(i)
# Read columns 2 and 4 from a table-oriented text file
# containing integer data
col2 = []
col4 = []
with open('tabledata.dat') as fnum:
for curr in fnum:
linesplit = curr.strip().split()
col2.append(int(linesplit[1]))
col4.append(int(linesplit[3]))