how to use str 28 29

Solutions on MaxInterview for how to use str 28 29 by the best coders in the world

showing results for - "how to use str 28 29"
Jannik
17 Mar 2017
1#Use str() to convert a non string value into one
2#Example:
3VariableToConvert = 1
4VariableAsAString = str(VariableToConvert)
5#We can see that VariableAsAString is a string if we try do to operations on it.
6#The result of trying an operation it would be: TypeError: can only concatenate str (not "int") to str
7