notation to describe subsequences of sequence slices are described as half-open intervalswith start index that is includedand stop index that is excluded for examplethe syntax data[ : denotes subsequence including the five indices an optional "stepvaluepossibly negativecan be indicated as third parameter of the slice if start index or stop index is omitted in the slicing notationit is presumed to designate the respective extreme of the original sequence because lists are mutablethe syntax [jval can be used to replace an element at given index lists also support syntaxdel [ ]that removes the designated element from the list slice notation can also be used to replace or delete sublist the notation val in can be used for any of the sequences to see if there is an element equivalent to val in the sequence for stringsthis syntax can be used to check for single character or for larger substringas with amp in example all sequences define comparison operations based on lexicographic orderperforming an element by element comparison until the first difference is found for example[ [ because of the entries at index thereforethe following operations are supported by sequence typess = equivalent (element by elements ! not equivalent lexicographically less than < lexicographically less than or equal to lexicographically greater than > lexicographically greater than or equal to operators for sets and dictionaries sets and frozensets support the following operatorskey in containment check key not in non-containment check = is equivalent to ! is not equivalent to < is subset of is proper subset of > is superset of is proper superset of the union of and the intersection of and the set of elements in but not the set of elements in precisely one of or note well that sets do not guarantee particular order of their elementsso the comparison operatorssuch as <are not lexicographicratherthey are based on the mathematical notion of subset as resultthe comparison operators define