19.内置函数二 abs():绝对值 lst = [1,2,-3,1,2,-5] print([abs(i) for i in lst]) enumerate("可迭代对象","序号起始值"):枚举获取键和值,起始值默认为0 lst [1,2,-3,1,2,-5] print([i for i in enumerate(lst)]) print(i for i in enumerate(lst,10)) max():求最大值,放可迭代对象 min():最小值 sum…
一.对象操作 help() 功能:返回目标对象的帮助信息 举例: print(help(input)) #执行结果 Help on built-in function input in module builtins: input(prompt=None, /) Read a string from standard input. The trailing newline is stripped. The prompt string, if given, is printed to standa…