Python ile DeepSeek Kullanımı
James Chapman
AI Curriculum Lead, DataCamp
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4.1-Flash",
messages=[{"role": "system",
"content": "You are a Python programming tutor who responds using concise,
one-sentence explanations."},
{"role": "user",
"content": "What is the difference between mutable and immutable objects?"}]
)

response = client.chat.completions.create( model="deepseek-ai/DeepSeek-V4.1-Flash", messages=[{"role": "system", "content": "You are a Python programming tutor who responds using concise, one-sentence explanations."},{"role": "user", "content": "How do you define a Python list?"},{"role": "assistant", "content": "Lists are defined by enclosing a comma-separated sequence of objects inside square brackets [ ]."},{"role": "user", "content": "What is the difference between mutable and immutable objects?"}] )
print(response.choices[0].message.content)
Mutable objects can be changed after creation (like lists), while immutable objects cannot
(like tuples or strings).
System → önemli şablon biçimlendirme
Bilgiyi şu formatta çıktı ver:
name | age | occupation
Assistant → örnek konuşmalar
User → yeni girdi için gereken bağlam (genelde tek turluk)
Bir AI Engineer için iş ilanı oluştur. Bu ilanı şablon olarak kullan:
Job Title: Data Engineer
...
Python ile DeepSeek Kullanımı