4

Python version 2.7.12

If I put three values in an array, how do I print only one of the values?

1

2 Answers 2

7

Let's say you have an array/list

kaka = ['bobo', 'fofo', 'lolo']

then print kaka[1] gives you fofo

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I am new to programming and I try python. This is the answer I was looking for.
-1
print values[0]
print values[1]
print values[2]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.