# Operators

Symbols | Function |
---|---|

+, -, *, / | Addition, Subtraction, Multiplication and Division |

** | Exponentiation |

// | Integer Divison |

% | Modulo Operation |

Operation Name | Operator | Explanation |
---|---|---|

less than | < | Less than operator |

greater than | > | Greater than operator |

less than or equal | <= | Less than or equal to operator |

greater than or equal | >= | Greater than or equal to operator |

equal | == | Equality operator |

not equal | != | Not equal operator |

logical and | and | Both operands True for result to be True |

logical or | or | One or the other operand is True for the result to be True |

logical not | not | Negates the truth value, False becomes True, True becomes False |

Operation Name | Operator | Explanation |
---|---|---|

indexing | [ ] | Access an element of a sequence |

concatenation | + | Combine sequences together |

repetition | * | Concatenate a repeated number of times |

membership | in | Ask whether an item is in a sequence |

length | len | Ask the number of items in the sequence |

slicing | [ : ] | Extract a part of a sequence |