So I need to find the smallest number for each row in this file which contains these numbers:
6,3,5
4,4,8
3,7,2
1,8,9
9,0,6
How would I be able to sort through each row to find the smallest number without using the built in min() or importing anything? This is what I have so far:
for line in input_file:
lines = line.split(' ')
lines = line.replace('\n',"").replace(',',"")
for i in range(len(lines)):
total = int(lines[i])
print total
if total > maximum:
maximum = total
print 'hey', maximum
print 'HI', maximum