I'm trying to figure out how many numbers in a text file are larger than 0.1. The text file has 1001 last names and numbers in the following format:
Doe 5
Anderson 0.3
Smith 6
I figured out how to separate the numbers but i'm having trouble converting my string of numbers into a list so that I can then compare them to 0.1
Here is what I have so far:
infile = open('last.txt')
lines = infile.readlines()
for line in lines:
items = line.split()
nums = (items[1])
also, once I have my list, how do I go about comparing it to 0.1?