When typing strings you have to put them in single quotes, like I'd shown above in the screenshot. The single quotes are really only there to tell the computer where the string begins and ends. The single strings are not a part of the string's value(it's just hello when printed, not 'hello'). Strings can have almost any keyboard character in them except for single quotes.
String Concatenation
You can add strings together using the + operator which is called string concatenation.
The + operator works differently on strings and integers because they are different data types('Hello' is a string, 5 is an integer).
After going over those two things, this chapter goes into writing programs in IDLE's file editor.
Idle's file editor |
No comments:
Post a Comment