首頁>Club>
15
回覆列表
  • 1 # Exploit

    1. 使用連線符: +

    world = "World"

    print "Hello " + world + " ! "

    2. 使用佔位符來內插

    world = "World"

    print "Hello %s !" % world

    3. 使用函式

    li = ["my","name","is","bob"]

    mystr = " ".join(li)

    print mystr

    上面的語句中字串是作為引數傳入的,可以直接用變數替換:

    begin_date = "2012-04-06 00:00:00"

    end_date = "2012-04-06 23:59:59"

    select * from usb where time between to_date(begin_date,"YYYY-MM-DD HH24:MI:SS") and to_date(end_date,"YYYY-MM-DD HH24:MI:SS")

  • 中秋節和大豐收的關聯?
  • 油價的上漲會影響你買燃油車嗎?