Example
List Methods - append, insert, pop
Adding and removing elements from list. Methods append, insert, pop and remove.
Showing 1–10 of 18
Example
Adding and removing elements from list. Methods append, insert, pop and remove.
Example
Useful methods for working with text: changing case, removing whitespace.
Example
Tuples have only two methods: count() for counting and index() for searching.
Example
…replacing and splitting text. Advanced string manipulation methods.
Quiz
…indexing, slicing, len(), split(), join() and string methods, with instant answers.
Quiz
…example: creating tuples , tuple unpacking , the tuple methods count() and index() and tuples vs lists . After this one, try the Python Lists Quiz or the Python Dictionaries Quiz .
Quiz
…beginner runs into: a second name for the same list, and methods that return None . What the quiz covers Indexing from the front and the back, slicing, len() and in Changing items, append() , insert()…
Quiz
Free beginner quiz on Python dictionaries: 15 questions on keys and values, get(), in, pop(), update(), loops and nested dictionaries. Instant answers.
Challenge
…strings can't be changed. Predict the crash, find out what methods and slices really give, build a new string instead, then swap a letter in the middle of a code.
Example
Methods sort() and reverse() for ordering list elements.