Glossary

Exercise 16-13 (key points):

Read just the first line: `with open(filepath) as f: first_line = f.readline()` - Count tokens: `len(first_line.split(","))`, `len(first_line.split(";"))`, etc. - Edge case: a file with quoted values containing the delimiter will count incorrectly. The `csv.Sniffer` class handles this more robustly:

Learn More

Related Terms