Skip to content

Commit f474e6f

Browse files
committed
correct the reference error
1 parent 8ce6438 commit f474e6f

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

python_csv/data.csv

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
id,name,email
2-
1,Alex,Alex@code.com
1+
id,name,email,amount,sent
2+
1,alex,alex@gmail.com,599.99,True
3+
1,alex,alex@gmail.com,599.99,True
4+
1,alex,alex@gmail.com,599.99,True
5+
1,alex,alex@gmail.com,599.99,True
6+
1,alex,alex@gmail.com,599.99,True
7+
1,alex,alex@gmail.com,599.99,True
8+
1,alex,alex@gmail.com,599.99,True
9+
1,alex,alex@gmail.com,599.99,True
10+
1,alex,alex@gmail.com,599.99,True

python_csv/read_specific_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def find_user(user_id=None, user_email=None):
77
row_id = int(row.get("id"))
88
unknown_id = None
99
unknown_email = None
10+
found_email = None
1011
if user_id is not None:
1112
if user_email is not None:
1213
if int(user_id) == row_id:
@@ -37,5 +38,5 @@ def find_user(user_id=None, user_email=None):
3738
return None
3839

3940

40-
user_1 = find_user(1, "alex@gmail.com")
41+
user_1 = find_user(10, "ale@gmail.com")
4142
print(user_1)

0 commit comments

Comments
 (0)