4 Matching Annotations
  1. Sep 2020
    1. A tuple is a sequence of values. The values can be any type, and they are indexed byintegers, so in that respect tuples are a lot like lists. The important difference is that tuplesare immutable
      • A tuple is a sequence of values. The values can be any type, and they are indexed by integers, so in that respect tuples are a lot like lists. The important difference is that tuples are immutable.
      • Strictly speaking, a function can only return one value, but if the value is a tuple, the effect is the same as returning multiple values.
      • Dictionaries have a method called items that returns a sequence of tuples, where each tuple is a key-value pair.
      • zip object:The result of calling a built-in function zip; an object that iterates through a sequence of tuples
      • .iterator:An object that can iterate through a sequence, but which does not provide list operators and methods.
      • data structure:A collection of related values, often organized in lists, dictionaries, tuples,
      • A dictionary is also like a list where in list only one type of variables need to be and in dictionaries there can be almost any type in one set.
      • A dictionary contains a collection of indices which are called keys and keep any values.
      • In dictionary we use curly brackets and in lists we use square brackets.
      • In a dictionary we can use for loop and it traverse the keys of dictionary.
      • In a dictionary another name for a ey value is pair.
      • Implementation a way of performing a computation.
      • HASHTABLE-The algorithm used to implement python dictionaries.
      • . list means it is a sequence of values.
      • .In a list we can store any type of values not like strings.
      • A list can be created easily by storing the values in square brackets.
      • We can do different types of operations in list like we can do concatenation.
      • List indices work the same way as string indices: 1-any integer expression can be used as an index. 2-if you try to read or write a element that does nt exist,you get an index error.
      • List slices ,list are mutable
      • in list to delete any type of variables we can use del,pop,remove.
      • The association of a variable with an object is called a reference.
      • MAP-a processing pattern that traverse a sequence and performs an operation on each element.
      • With lists we can perform different types of operations.
      • A String is a sequence of character.you can access the character using bracket operator.
      • In string the expression in brackets is called index it calculates the character from 0.
      • In index we can do operations and if it is not in integer it gives you error.
      • Len means it is a built in function that returns the number of characters in the string.
      • A lot of computations involve processing a string and while doing it will do from beginning with each and every string.it is known as traversal wit for loop in string.
      • String slice means we can divide a word into two and we can do concatenation.
      • In string we cannot use some operators we can only use some operators like in, as,etc.
      • . String is immutable we cannot change .