Skip to main content
← CoursesAI Engineering with PythonModule 0 · Before you startPrerequisites — what you should know before this trackpredict1 / 101
💬 Discuss🧪 Playground+25 XP
Task
Read the snippet below carefully. Predict the exact output (both lines). This exercises the patterns ai-eng-01 opens with: dict access + string slicing on an API-key-shaped value. If you can predict this you're ready; if you can't, take a Foundations refresher first.

Keep going

🔮 Predict the output

Read the code carefully

config = {"api_key": "sk-ant-2026-demo-XYZ"}
key = config.get("api_key", "missing")
print(key[:6])
print(key[-3:])

What will the program print? Write here:

📣 Help someone learn PythonShare this lesson with a friend — the first 15 are free, no signup.Tweet

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…