1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Python for Developers

Connected

Exercise

Modifying string values

Your recipe scaler project needs to handle ingredient names that users might enter in different formats. You want to update any generic entries to make your recipe clearer. Additionally, to ensure your shopping list doesn't have duplicate entries, you need to standardize all ingredient names to lowercase.

Instructions

100 XP
  • Use the .replace() method to update pasta_type by changing "pasta" to "fusilli pasta".
  • Convert the ingredient_one variable to lowercase using the .lower() method.