Learn Python - Free Interactive Python Tutorial

Learn Python - Free Interactive Python Tutorial

Comments

  1. declare a list
    list = []

    declare a dictionary
    dic = {}

    ReplyDelete
  2. Regular Expressions in Python

    An example regex is r"^(From|To|Cc).*?python-list@python.org"

    - the caret ^ matches text at the beginning of a line.
    - the part with (From|To|Cc) means that the line has to start with one of the words that are separated by the pipe |
    - The .*? means to un-greedily match any number of characters, except the newline \n character. The un-greedy part means to match as few repetitions as possible. The . character means any non-newline character, the * means to repeat 0 or more times, and the ? character makes it un-greedy.

    ReplyDelete

Post a Comment

Popular posts from this blog

Unique Binary Search Trees

Coin in Line