000001 Lecture Notes - Tuple, Json
Document Summary
A list is a collection of ordered data. A tuple is an ordered collection of data. A dictionary is an unordered collection of data that stores data in key-value pairs. Sets are mutable and have no duplicate elements. Dictionaries are mutable and keys do not allow duplicates. The append() method adds a single item at the end of the list without modifying the original list. The pop() method removes the item at the given index from the list and returns it. The sort() method sorts the elements of a given list in a specific ascending or descending order. index() searches for a given element from. An element cannot be added to the tuple as it is immutable. The set add() method adds a given element to a set. Dictionaries are enclosed in curly brackets in the form of key-value pairs. The update() method updates the dictionary with the specified key- value pairs.