Talk = ''
Talk = greeting + ' fellow blogsters! '
Talk += 'How are we doing today?'
def create_sign(greeting, decoration = "*"):
line = decoration * len(greeting) # len(STRING) gets the length of a string
- You can make functions by
- Named references should be thought of as objects rather than variables
- Assignment attaches a name to the object
- Changing assignment from one reference to another puts two different names referring to the same object
- The is operator determines if references are the same object
- Python garbage collector reclaims unreachable objects
- Function arguments can be specified with defaults
- The default expressions are evaluated once when def is executed for the first time
- Global references can be read from a local scope but only when you specify