Concatenating strings together #
You can combine two or more strings using the + operator.
For example:
full_greeting = "Hello" + ", " + "Alice" + "!"
print(full_greeting) # Output: Hello, Alice!
Exercise #
- Create a variable
full_nameby combining your first and last name together. - Make sure to use the
+operator to combine those strings. - Make sure that there is a space between your first and last name.
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules