Skip to content

Commit

Permalink
Name and Cuisines Update main.py
Browse files Browse the repository at this point in the history
Now, we are adding in the cuisines to display. We're making use of the join() method for a better view of the results.
  • Loading branch information
Uma2197 authored Apr 21, 2024
1 parent 28a36eb commit 53b8e5b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
def display_restaurant_info(data):
for restaurant in data:
name = restaurant['name']

print(f"Name: {name}")
cuisines = []
for cuisine in restaurant["cuisines"]:
cuisines.append(cuisine["name"])
cuisine = ",".join(cuisines)

print(f"Name: {name}\nCuisines: {cuisine}")


display_restaurant_info(restaurant_data)
Expand Down

0 comments on commit 53b8e5b

Please sign in to comment.