Aller au contenu principal
← CoursAI Engineering with PythonModule 0 · Before you startPrérequis — ce que vous devez savoir avant cette pistepredict1 / 105
+25 XP
Tâche🌐 shown in RU
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.
Prédis la sortie

Lis le code attentivement

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

Que va afficher le programme ? Écris ici :

💬 Discussion

Soyez le premier à poser une question ou partager une astuce.
Connectez-vous pour rejoindre la discussion. La lecture est gratuite.
Chargement de la discussion…