Back to Module 2

Methods

Methods are functions attached to an object.

sample = "This is a STRING"

.lower()

sample.lower()

.split()

sample.split()
sample.lower().split()

Combining functions and methods

len(sample.lower().split())

Practice

my_text = "Python is Fun"

print(my_text.lower())
print(my_text.split())
print(len(my_text.split()))

Next: Exercises