Skip to contentSkip to navigation

Module 5 of 6, Python in Depth

Text and Data

Parse text with advanced patterns, handle bytes and encodings, and build a data pipeline.

module checksSign in to track

  • Lessons complete-, not done
  • Lesson quizzes taken-, not done
  • Module Labs passed-, not done
  • Module exam passed at 80%-, not done
lessons
3
quiz questions
36
reading time
30 min
exam length
15 Q
coding exercises
4

Lessons

  1. Advanced Regular ExpressionsGo beyond regex basics: named and non-capturing groups, lazy repetition, finditer and match positions, compiled verbose patterns, flags, backreferences, lookarounds, replacement functions and re.escape. 9 min 12 questions
  2. Text Encodings and Binary DataUnderstand the difference between text and bytes: Unicode code points, UTF-8, encode and decode with error handling, mojibake, bytes and bytearray, binary files, and packing binary records with struct. 10 min 12 questions
  3. Building a Data PipelineDesign a data pipeline as small stages: extract records from messy input, validate them, transform them lazily with generators and load the clean results, while keeping rejected rows and counts. 11 min 12 questions

Lab: write it yourself

Real Python, real checks: write your answer, press Run checks, and keep going until it passes. (1 exercises)

All module exercises

The Lab needs an account. Sign in or create a free ID to run these exercises.

Lab 1: UTF-8 byte length

Sign-in required

Encode the string "Python ๐Ÿ" to UTF-8 bytes. Print: Byte length: 11.

Sign in to practise

Sign in to access the interactive Python editor, write and run code checks against automated tests, use hints, and save your practice. Practice does not award XP.