Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 222ed8e

Browse files
committed
Added note about blank line
1 parent 3d776c2 commit 222ed8e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Notes/02_Working_with_data/02_Containers.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ with open('Data/prices.csv', 'rt') as f:
105105
prices[row[0]] = float(row[1])
106106
```
107107

108+
Note: If you try this on the `Data/prices.csv` file, you'll find that
109+
it almost works--there's a blank line at the end that causes it to
110+
crash. You'll need to figure out some way to modify the code to
111+
account for that (see Exercise 2.6).
112+
108113
### Dictionary Lookups
109114

110115
You can test the existence of a key.

0 commit comments

Comments
 (0)