Skip to main content
← CoursesPython for Office WorkersModule 6 · API integrationsOpenAI / Anthropic SDK — chat completion in 5 linespredict27 / 50
💬 Discuss🧪 Playground+125 XP
Task
After calling resp = client.messages.create(...), the answer text lives at the property resp.content[?].text Fill in the index — type just the digit.

Keep going

🔮 Predict the output

Read the code carefully

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…