Read each Python program and choose what it prints. Every program was run on Python 3, so the answers are the real output. Programs that need their own module create it in a temporary folder first.
Question 11Medium
What is the output of the following Python program?
main.py
from pathlib import PurePosixPath as P
p = P("data") / "2026" / "marks.final.csv"
print(p, p.suffix, p.stem, p.parent, p.name)
Adata/2026/marks.final.csv .final.csv marks data/2026 marks.final.csv
Bdata\2026\marks.final.csv .csv marks.final data marks
Cdata/2026/marks.final.csv csv marks data/2026 marks.final
We use Google Analytics cookies to see how LearnFrenzy is used and make it better, and Google AdSense to keep it free.
No analytics or ad cookies are set until you accept. Privacy Policy
·