← Back to Lists
Question 147
Numbered Lines
Numbered Lines
The last element of the list names is read from input() with no prompt. Print every name on its own line in the form <number>. <name> where the numbers start at 1 and go up by one per line, using a for loop over the names and a counter variable called position that you increase yourself. Input: one line, a name.
Expected Output:
1. Giselle 2. Maya 3. Omar 4. Lena
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Lists
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.