1. 20. Valid Parentheses

    class Solution(object):
        def isValid(self, s):
            """
            :type s: str
            :rtype: bool
            """
    
            list = []
            l=["(","[","{"]
            n=[")","]","}"]
            issy=True
    
            if len(s) == 0:
                return False
    
            i=0
            while i<len(s) and issy:
                 if s[i] in l:
                    list.append(s[i])
                 elif len(list)!=0:
                    firsti=list[-1]
                    if l.index ...
    read more
  2. 键盘上所有特殊符号的英文读法


    特殊符号的英文读法

    • ! 叹号 exclamation mark/bang
    • ? 问号 question mark
    • , 逗号 comma
    • . 点号 dot/period/point
    • : 冒号 colon
    • ; 分号 semicolon
    • ” 双引号 quotation marks/double quote
    • ‘ 单引号/撇号 apostrophe/single quote
    • ` 重音号 backquote/grave accent
      • 星号 asterisk/star
      • 加号 plus sign
      • 减号/横线 hyphen/dash/minus sign/
    • = 等号 equal sign
    • / 斜线 slash
    • \ 反斜线 ...
    read more
  3. Method of Python

    Method of List

    Method Name Use Explanation
    append alist.append(item) Adds a new item to the end of a list
    insert alist.insert(i,item) Inserts an item at the ith position in a list
    pop alist.pop() Removes and returns the last item in a list
    pop alist ...
    read more
  4. practical Japan travel tips

    If there's a choice, fly into Haneda, not Narita

    Haneda Airport is a lot more convenient for most travelers to fly into than Narita International Airport owing to the distance from Tokyo for both. It is not always an option. Delta for example only flies in and out of ...

    read more
  5. Use Pelican and GitHub Page to create blog

    This is a test

    Code blocks must be indented by 4 whitespaces. Python-Markdown has a auto-guess function which works pretty well:

    print("Hello, World")
    # some comment
    for letter in "this is a test":
        print(letter)
    

    In cases where Python-Markdown has problems figuring out which programming language we use, we can ...

    read more

« Page 23 / 23

blogroll

social