Python: Concatenating Strings
Python: Concatenating Strings
Whitespaces matter
E.g.
Product = 3 ** 3 (Power)
Product = 3 * 3 (Multiplication)
When printing a string but an apostrophe is present, python stops the string there, thus
Dot Notation
Only used for string variables, however, functions such as len and str don’t need it as they can deal
with other data types
String Formatting
Date and Time
And Or Not
Functions
def functioname(argument):
import math
Import these way in order not to have to type math.sqrt all the time. However, it is better to have
math.sqrt as sqrt may be a function name of your own coding.
For Loops
appending numbers into
another list then sorting it
Appending into a
dictionary
For-else
Checking int: