Functions
Help function
help(max)
?max
Help on built-in function max in module builtins:
max(...)
max(iterable, [, default=obj, key=func]) -> value max(arg1, arg2, args, *[, key=func]) -> value
With a single iterable argument, return its biggest item. The default keyword-only argument specifies an
object to return if the provided iterable is empty.
With two or more arguments, return the largest argument.
Methods
String Methods
room = "poolhouse"
Upper
room_up=room.upper()
print(room)
print(room_up)
poolhouse
POOLHOUSE
Count
print(room.count("o"))
3
List Methods
areas = [11.25, 18.0, 20.0, 10.75, 9.50]
Index
print(areas.index(20.0))
2
Count
print(areas.count(14.5))
0
Append
areas.append(24.5)
areas.append(15.45)
print(areas)
[11.25, 18.0, 20.0, 10.75, 9.5, 24.5, 15.45]
Reverse
areas.reverse()
print(areas)
[15.45, 24.5, 9.5, 10.75, 20.0, 18.0, 11.25]
Remove
areas.remove(24.5)
print(areas)
[15.45, 24.5, 9.5, 10.75, 20.0, 18.0, 11.25]