Python相關文章索引(11)

基本常識

  1. python 使用set對列表去重,並保持列表原來順序
  2. python基礎-python函數any()與all()的區別
  3. Python ceil() 函數

    ceil() 函數返回數字的上入整數。

  4. python 判斷字符串是不是字母

    其中isdigit()不能用來判斷負數

  5. Python 字符串大小寫轉換

  6. Python isalnum()方法

    Python isalnum() 方法檢測字符串是否由字母和數字組成。

  7. 從Python中readline()函數讀取的一行內容中去掉換行符\n

    方法是使用strip()函數

  8. Python 3 格式化字符串的幾種方法!

  9. python readline()逐行讀,怎麼判斷已到末尾?

Debug

  1. isdigit()不能判斷負數
  2. terms of service.
    Django Help: AttributeError: ‘module’ object has no attribute ‘Charfield’

    change ‘Charfield’ to ‘CharField’

  3. terms of service.
    CommandError: App ‘books’ has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations

P.K.

python 數組的del ,remove,pop區別

①remove 是刪除首個符合條件的元素。並不是刪除特定的索引
②del 來說,它是根據索引(元素所在位置)來刪除的
③pop返回的是你彈出的那個數值。

發佈了84 篇原創文章 · 獲贊 43 · 訪問量 26萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章