From 82870342658f505f8cf1274dd8c93a7b38b69a64 Mon Sep 17 00:00:00 2001 From: wgriffa Date: Tue, 17 Oct 2023 08:25:17 -0400 Subject: [PATCH] Update 14-looping-data-sets.md If you run the original command, print(p.parent), print(p.stem), print(p.suffix) The output is, data gapminder_gdp_africa .csv (None, None, None) The last line is confusing, "(None, None, None)" You're essentially doing three separate print calls and then creating a tuple with their return values. The print function in Python doesn't return any meaningful value (it returns None), so when you group them together with commas, you're creating a tuple of their return values, which is (None, None, None). To get a clean output like you see in the lessons, you have to write the print statement on three separate lines. --- episodes/14-looping-data-sets.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/episodes/14-looping-data-sets.md b/episodes/14-looping-data-sets.md index ec19be367..d64082780 100644 --- a/episodes/14-looping-data-sets.md +++ b/episodes/14-looping-data-sets.md @@ -222,7 +222,9 @@ directories. In the example below, we create a `Path` object and inspect its att from pathlib import Path p = Path("data/gapminder_gdp_africa.csv") -print(p.parent), print(p.stem), print(p.suffix) +print(p.parent) +print(p.stem) +print(p.suffix) ``` ```output