Multiline and ignore-case flags
Write a Python program to find lines that start with "error" in any case. Step-by-step explanation, colour-coded code and real output.
Online Learning Platform
Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.
Write a Python program to find lines that start with "error" in any case. Step-by-step explanation, colour-coded code and real output.
Write a Python program to print each match of a word with its start and end positions. Step-by-step explanation, colour-coded code and real output.
Write a Python program to extract rupee prices like Rs 1,499.50 and add them up. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find accidentally repeated words like "the the". Step-by-step explanation, colour-coded code and real output.
Write a Python program to check IPv4 addresses (each part 0-255). Step-by-step explanation, colour-coded code and real output.
Write a Python program to convert camelCase names to snake_case. Step-by-step explanation, colour-coded code and real output.
Write a Python program to mask all but the last 4 digits of card numbers. Step-by-step explanation, colour-coded code and real output.
Write a Python program to parse "LEVEL date message" log lines into dictionaries. Step-by-step explanation, colour-coded code and real output.
Write a Python program to count the word "test" but not "testing" or "latest". Step-by-step explanation, colour-coded code and real output.
Write a Python program to split text on commas, semicolons and spaces. Step-by-step explanation, colour-coded code and real output.
Write a Python program to remove everything except letters, digits and spaces. Step-by-step explanation, colour-coded code and real output.
Write a Python program to replace runs of whitespace with a single space. Step-by-step explanation, colour-coded code and real output.
Take free timed mock tests with answers and explanations.