Commit 5c08416
committed
feat: Display shopping list using escape sequences for formatting [string-escape-print]
🔑 Key: string-escape-print
🧠 Logic:
- Uses `\n` for newline to list items line by line.
- Uses `\t` (via spacing) and `-` for bullet points.
- Escapes double quotes (`\"`) for the word "Organic".
- Escapes backslash (`\\`) to print a literal backslash between "Apples \ Pears".
🎯 Focused on understanding how special characters and escape sequences improve text formatting in console outputs.
🧪 Sample Output:
My shopping List:
- Bread
- "Organic" Milk
- Apples \ Pears
Signed-off-by: Somesh diwan <[email protected]>1 parent cdbe1cc commit 5c08416
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments