pyPython Practice LabFrom first print to final round
TOPIC 06 OF 18

Strings and Text Processing Python lessons

Indexing, slicing, searching, formatting, normalization, and character-by-character logic.

10 exercises8+ conceptsBeginner → interview context
Start this topic
WHAT YOU WILL LEARN

Core concepts

Reverse textCheck a phrase palindromeCount vowels and consonantsCount wordsCount a chosen characterRemove duplicate charactersCheck for anagramsFind the first nonrepeating character
REUSABLE THINKING

Problem-solving patterns

  • slice · string
  • normalization · palindrome
  • isalpha · counting
  • split · len
  • count · case sensitivity
LESSON OUTCOME

What this topic builds

Learn the idea once, trace it through two verified cases, then explain why your approach works.

ORDERED LESSONS

All 10 lessons in this topic

Work from top to bottom to build each concept gradually.

  1. #037
    Reverse text

    Reverse a short product label for a string-slicing exercise.

    StarterPremium
  2. #038
    Check a phrase palindrome

    Check a phrase that is a palindrome when spaces and case are ignored.

    StarterPremium
  3. #039
    Count vowels and consonants

    Count the letter types in a short course title.

    BeginnerPremium
  4. #040
    Count words

    Count words in a normal sentence.

    BeginnerPremium
  5. #041
    Count a chosen character

    Count how often a letter appears in a fruit name.

    BeginnerPremium
  6. #042
    Remove duplicate characters

    Keep only the first appearance of each character in a word.

    BeginnerPremium
  7. #043
    Check for anagrams

    Check two short words made from the same letters.

    IntermediatePremium
  8. #044
    Find the first nonrepeating character

    Find the earliest character that appears only once.

    IntermediatePremium
  9. #045
    Run-length encode text

    Encode a compact sensor status string with repeated runs.

    IntermediatePremium
  10. #046
    Find the longest word

    Find the longest word in a brief course description.

    AdvancedPremium