Python · Interactive Mode & First Steps

After x = ["Python", "is", "great"], what does x[0] return — and what's the off-by-one trap?

Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.

Get it on App StoreGet it on Google Play

This is one card from the KnowCard library — thousands more across SAP, Linux, Python and more. In the app you get the answer, AI explanations, and cards that come back right before you would forget them. Free to start on iOS, Android or the web.

More in Interactive Mode & First Steps

What does this scientific-notation literal evaluate to, and what type is it? ``` >>> 12.345e3 ```
You type a literal at the >>> prompt and want to know its data type without guessing. What do you do?
At the >>> prompt you type a bare expression and press Enter. What does the interactive interpreter do with the result?
The REPL auto-echoes a string differently from how print shows it. What does each line below produce? ``` >>> "Hello World" >>> print("Hello World") ```
In the interactive mode, what does the underscore _ refer to, and where does this NOT work?
An assignment like x = 5 is a statement, not an expression. What does the REPL print right after you enter it?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play