Skip to content

Commit ff33e68

Browse files
committed
formatters
1 parent 4042a69 commit ff33e68

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

flask/part3_templates/ex3-app/students3.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def get_student(source, idnum):
3333
city = record["location"]["city"].title()
3434
state = record["location"]["state"].title()
3535
postal = str(record["location"]["postcode"])
36-
address = street + ", " + city + ", " + state + " " + postal
36+
# address = street + ", " + city + ", " + state + " " + postal
37+
address = f'{street}, {city}, {state} {postal}'
3738
return name, photo, address
3839
# return these if id is not valid
3940
return "Unknown", "", "Unknown"

flask/part3_templates/ex3-app/students4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def get_student(source, idnum):
3535
city = record["location"]["city"].title()
3636
state = record["location"]["state"].title()
3737
postal = str(record["location"]["postcode"])
38-
address = street + ", " + city + ", " + state + " " + postal
38+
# address = street + ", " + city + ", " + state + " " + postal
39+
address = f'{street}, {city}, {state} {postal}'
3940
return name, photo, address
4041
# return these if id is not valid
4142
return "Unknown", "", "Unknown"

0 commit comments

Comments
 (0)