When using built-in functions of strings in Python, there are a few common mistakes that people make. Here are some examples with code samples:
1. Not using parentheses to call the function:
When calling a built-in function of a string, it's important to use parentheses to indicate a function call. Forgetting to include parentheses can lead to unexpected results or errors.2. Forgetting to assign the result of the function to a variable:
Built-in string functions in Python return a modified version of the original string. Forgetting to assign the result of the function call to a variable will discard the modified string and lead to undesired outcomes.