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万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章