Python内置函数大全,完整列表
Python是一种强大的编程语言,其内置了众多实用的函数,从控制流到字符串操作、集合操作、数学运算、文件操作等等,都有相应的内置函数可供使用。以下是Python内置函数的完整列表:
1. abs()
2. all()
3. any()
4. ascii()
5. bin()
6. bool()
7. breakpoint()
8. bytearray()
9. bytes()
10. callable()
11. chr()
12. classmethod()
13. compile()
14. complex()
15. delattr()
16. dict()
17. dir()
18. divmod()
19. enumerate()
20. eval()
21. exec()
22. filter()
23. float()
24. format()
25. frozenset()
26. getattr()
27. globals()
28. hasattr()
29. hash()
30. help()
31. hex()
32. id()
33. input()
34. int()
35. isinstance()
36. issubclass()
37. iter()
38. len()
39. list()
40. locals()
41. map()
42. max()
43. memoryview()
44. min()
45. next()
46. object()
47. oct()
48. open()
49. ord()
50. pow()
51. print()
52. property()
53. range()
54. repr()
55. reversed()
56. round()
57. set()
58. setattr()
59. slice()
60. sorted()
61. staticmethod()
62. str()
63. sum()
64. super()
65. tuple()
66. type()
67. vars()
68. zip()
69. __import__()
70. TypeError()
71. ValueError()
72. IndexError()
73. KeyError()
74. NameError()
75. ZeroDivisionError()
76. AttributeError()
77. StopIteration()
78. TypeError()
79. UnicodeError()
80. RuntimeError()
81. FileNotFoundError()
82. IOError()
83. EOFError()
84. IndentationError()
85. SyntaxError()
86. SystemExit()
87. FloatingPointError()
88. OverflowError()
89. EnvironmentError()
90. AttributeError()
91. ImportError()
92. NotImplemented()
93. GeneratorExit()
94. AssertionError()
95. Warning()
96. PendingDeprecationWarning()
97. DeprecationWarning()
98. RuntimeWarning()
99. SyntaxWarning()
100. UserWarning()
101. FutureWarning()
102. ImportWarning()
103. BytesWarning()
104. ResourceWarning()
105. complex()
106. dir()
107. divmod()
108. enumerate()
109. filter()
110. isinstance()
111. len()
112. map()
113. max()
114. min()
115. next()
116. oct()
117. pow()
118. range()
119. Reversed()
120. round()
121. sorted()
122. str()
123. sum()
124. zip()
125. help()
126. callable()
127. repr()
128. abs()
129. all()
130. any()
131. ascii()
132. bin()
133. bool()
134. bytearray()
135. bytes()
136. chr()
137. classmethod()
138. compile()
139. complex()
140. delattr()
141. dict()
142. dir()
143. divmod()
144.enumerate()
145. eval()
146. exec()
147. filter()
148. float()
149. format()
150. frozenset()
151. hasattr()
152. hash()
153. hex()
154. id()
155. input()
156. int()
157. isinstance()
158. issubclass()
159. iter()
160. len()
161. list()
162. locals()
163. map()
164. max()
165. memoryview()
166. min()
167. next()
168. object()
169. oct()
170. open()
171. ord()
172. pow()
173. print()
174. property()
175. range()
176. repr()
177. reversed()
178. round()
179. set()
180. setattr()
181. slice()
182. sorted()
183. staticmethod()
184. str()
185. sum()
186. super()
187. tuple()
188. type()
189. vars()
190. zip()
191. AttributeError()
192. AssertionError()
193. BaseException()
194. BlockingIOError()
195. BrokenPipeError()
196. ChildProcessError()
197. ConnectionAbortedError()
198. ConnectionError()
199. ConnectionRefusedError()
200. ConnectionResetError()
201. DeprecationWarning()
202. EOFError()
203. EnvironmentError()
204. Exception()
205. FileExistsError()
206. FileNotFoundError()
207. FloatingPointError()
208. FutureWarning()
209. GeneratorExit()
210. ImportError()
211. IndentationError()
212. IndexError()
213. InterruptedError()
214. IOError()
215. IsADirectoryError()
216. KeyError()
217. KeyboardInterrupt()
218. LookupError()
219. MemoryError()
220. ModuleNotFoundError()
221. NameError()
222. NotImplementedError()
223. OSError()
224. OverflowError()
225. PendingDeprecationWarning()
226. PermissionError()
227. ProcessLookupError()
228. RecursionError()
229. ReferenceError()
230. ResourceWarning()
231. RuntimeError()
232. StopAsyncIteration()
233. StopIteration()
234. SyntaxError()
235. SyntaxWarning()
236. SystemError()
237. SystemExit()
238. TabError()
239. TimeoutError()
240. TypeError()
241. UnboundLocalError()
242. UnicodeDecodeError()
243. UnicodeEncodeError()
244. UnicodeError()
245. UnicodeTranslateError()
246. UnicodeWarning()
247. UserWarning()
248. ValueError()
249. Warning()
250. WindowsError()
251. ZeroDivisionError()
总结:
Python内置函数的数量很多,对于初学者来说可能有些吃不消。建议先掌握常用的几十个函数,熟悉了之后再逐渐学习其他函数。好处是一旦学会某些内置函数,可以快速解决许多问题,提高编程效率。
