Regex Wizards: Mastering Search and Replace in Python

Advanced Search Function 2/2Advanced Search Function 2/2

Task

  1. Import re;
  2. Define a text variable as "The cost is $5.";
  3. Search for any numerical value in the string;
  4. Print the output.

Everything was clear?

Section 1. Chapter 4

Start learning today and achieve
coding mastery

  • Master Python, SQL, JavaScript & more.
  • Learn with Step-by-Step Lessons.
  • Get Ready for Real-World Projects.
  • Earn a Certificate Upon Completion.