python_basics.ipynb
typo 7 und co
Methods
In Python, functions are not the only things that allow you to 'do' things with data. As you've seen in the previous notebook, there are also methods! Different types of objects in Python, such as stings and lists, have their own set of methods. For example, the function you defined above (
extract_last_element()
) also exists as a method each list has, calledpop()
! (This is a builtin, standard, method that each list in Python has.) See for yourself in the block below.
"previous" is in this compilation not a notebook, but a section
strings