The one-liner Python writes when it's showing off — step 7 of 9
Cursor wanted to keep only names longer than 3 characters. Instead of
filtering them out, it used an if/else inside the expression, so short
names got replaced with the string "-" instead of removed.
Output is currently ['alex', '-', 'jordan', '-']. Fix line 2 so the
output is ['alex', 'jordan'] — short names removed entirely.
Cursor wanted to keep only names longer than 3 characters. Instead of
filtering them out, it used an if/else inside the expression, so short
names got replaced with the string "-" instead of removed.
Output is currently ['alex', '-', 'jordan', '-']. Fix line 2 so the
output is ['alex', 'jordan'] — short names removed entirely.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.