On Tuesday, 26 April 2016 17:14:36 UTC+1, Ian wrote: > On Tue, Apr 26, 2016 at 10:01 AM, <peakgraph...@gmail.com> wrote: > > I am wondering how to make my code function so it does not allow any of the > > same values to be entered into a column in my CSV file created through > > python. So I need to read into the CSV file and check if any names have > > already been entered. If they have, the user must not be allowed to enter > > this value. > > Assuming the file is reasonably small enough to fit into memory, > create a set and populate it with the values in the column. When the > user enters a new value, check whether it's already in the set.
That's exactly what I want to do, however, I'm unsure how to check whether it's in the set? -- https://mail.python.org/mailman/listinfo/python-list