Python相关文章索引(11)

作者: 司小幽 | 来源:发表于2017-09-30 08:21 被阅读24次

    基本常识

    1. python 使用set对列表去重,并保持列表原来顺序
    2. python基础-python函数any()与all()的区别
    3. Python ceil() 函数

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

    1. python 判断字符串是不是字母

    其中isdigit()不能用来判断负数

    1. Python 字符串大小写转换
    2. Python isalnum()方法

    Python isalnum() 方法检测字符串是否由字母和数字组成。

    1. 从Python中readline()函数读取的一行内容中去掉换行符\n

    方法是使用strip()函数

    1. Python 3 格式化字符串的几种方法!
    2. python readline()逐行读,怎么判断已到末尾?

    Debug

    1. isdigit()不能判断负数
    2. terms of service.
      Django Help: AttributeError: 'module' object has no attribute 'Charfield'

    change 'Charfield' to 'CharField'

    1. 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返回的是你弹出的那个数值。

    相关文章

      网友评论

        本文标题:Python相关文章索引(11)

        本文链接:https://www.haomeiwen.com/subject/necgextx.html