Problem scenario
You see Python code with this “-str” syntax. What does it do?
Answer
It is purely for readability. To help your coworkers we recommend using the “-str” syntax if a function returns a string. Otherwise the way to find out is to read the code or temporarily change the code and use type(variable_returned) to show the data type of that which is/was returned.
…
Continue reading “What Does the “-> str” Syntax Signify in Python Functions?”