Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Slicing and Search Drills | Section
Working with Numbers in Python: Integers, Floats, and Type Conversion - 1769704232138
Section 1. Chapter 18
single

single

Challenge: Slicing and Search Drills

Swipe to show menu

Task

Swipe to start coding

Use simple string tools — methods, slicing, in, and f-strings — to complete each expression. All variables are already defineddo not change them.

Compute:

  1. name_clean — remove extra spaces from full_name.
  2. has_quick — check if "quick" appears in sentence (case-insensitive).
  3. inside_parens — extract text between parentheses ( and ).
  4. o_count — count how many 'o' letters are in sentence (case-insensitive).
  5. domain — from email, take everything after @ (after trimming and lowercasing).
  6. report — build "Name | Domain | Count" using an f-string and SEP.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 18
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt