⚑ IT Wisdom Zero trust security means I don't trust the network, the users, the endpoints, or the person who designed this architecture.
Skilled Practitioner
4249 XP 1751 to Expert
Objective: Use datetime to build a fixed-format backup filename and a human-readable change log entry.
Instructions

Create a file called lab3.py. Use a fixed datetime so the output matches exactly β€” do not use datetime.now():

from datetime import datetime
ts = datetime(2025, 4, 15, 9, 30, 0)

Use ts to generate:

  1. A backup filename in the format: backup_<YYYYMMDD>_<HHMMSS>.cfg
  2. A change log entry in the format: [2025-04-15 09:30:00] Config backup created for sw-core-01

Your output must match exactly:

backup_20250415_093000.cfg
[2025-04-15 09:30:00] Config backup created for sw-core-01

Run it with python3 lab3.py. Paste your output below and submit.

πŸ’‘ Show Hint
Use ts.strftime("%Y%m%d_%H%M%S") for the filename timestamp and ts.strftime("%Y-%m-%d %H:%M:%S") for the log entry. Build both with f-strings.
Paste Your Output
Next Lab β†’