common operations on numerical types + is the sum of and - is minus * is the product of and // is integer division / is divided by in python when and are both of type intthe result is also an intotherwise the result is float % is the remainder when the int is divided by the int ** is raised to the power + is equivalent to *and -work the same way comparison and boolean operators = returns true if and are equal ! returns true if and are not equal have their usual meanings and is true if both and are trueand false otherwise or is true if at least one of or is trueand false otherwise not is true if is falseand false if is true common operations on sequence types seq[ireturns the ith element in the sequence len(seqreturns the length of the sequence seq seq concatenates the two sequences *seq returns sequence that repeats seq times seq[start:endreturns slice of the sequence in seq tests whether is contained in the sequence not in seq tests whether is not contained in the sequence for in seq iterates over the elements of the sequence common string methods count( counts how many times the string occurs in find( returns the index of the first occurrence of the substring in - if is not in rfind( same as findbut starts from the end of index( same as findbut raises an exception if is not in rindex( same as indexbut starts from the end of lower(converts all uppercase letters to lowercase replace(oldnewreplaces all occurrences of string old with string new rstrip(removes trailing white space split(dsplits using as delimiter returns list of substrings of