Mysterious Printing Errors


Prints 10


Gives the following error:

Can't convert 'int' object to str implicitly

and strangely the order matters


unsupported operand type(s) for +: 'int' and 'str'

Exactly why they are different in the way that they are is not what's important right now. What's important is that you're trying to combine different types and python doesn't know how to do that without help.

Brief List of Python Types

int - whole numbers for counting

float - decimal point numbers

str - strings of text

bool - boolean True or False

There are more but this short list will get you started.

Next Post; String Delimiters

Recent Posts