Rodrigo Girão Serrão 🐍🚀 @mathspp.com · Nov 7

When building complex readable strings, consider building them out of smaller fragments. The function `oxford_comma`, shown below, demonstrates this technique. What's the point of the smaller fragments?

1 likes 1 replies

?

Replies

Rodrigo Girão Serrão 🐍🚀 · Nov 7

They allow you to avoid using multiple `if` statements to append portions of the result to a final result string. By using these fragments (and by using empty strings when the fragments are unnecessary), you keep your code flatter and cleaner.