Back to Lesson

Prefix Routing

Filter based on initial string patterns.

Instructions

  • Given
    files = ["sys_boot.log", "app_error.log", "sys_temp.tmp"]
    .
  • Iterate over
    files
    and check if the string starts with
    "sys_"
    .
  • If it does, print the file name.
main.py
main.py