← Quiz: Python Loops: all 13 questions
Quiz: Python Loops · Question 13 of 13
What does this print? (code)
What does this print?
for ch in "abc":
print(ch * 2, end=" ")
- A.abcabc
- B.a b c a b c
- C.aa bb cc
- D.aabbcc
Answer & explanation
Correct answer: aa bb cc
The loop visits each letter, prints it twice, and end=" " puts a space instead of a new line.
Can you get the rest right without peeking?
Take the timed Quiz: Python Loops quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →