Add tech_docs/python/important_functions.md
This commit is contained in:
48
tech_docs/python/important_functions.md
Normal file
48
tech_docs/python/important_functions.md
Normal file
@@ -0,0 +1,48 @@
|
||||
Here are the most important Python functions to learn and master:
|
||||
|
||||
## Built-in Functions
|
||||
1. **print()** - Output text and variables
|
||||
2. **input()** - Capture user input
|
||||
3. **len()** - Get the length of objects (strings, lists, etc.)
|
||||
4. **range()** - Generate sequences of numbers
|
||||
5. **type()** - Check the data type of an object
|
||||
6. **int(), float(), str(), bool()** - Type conversion functions
|
||||
7. **sum(), min(), max()** - Mathematical operations on iterables
|
||||
|
||||
## String Methods
|
||||
1. **split()** - Convert string to list
|
||||
2. **join()** - Combine list elements into string
|
||||
3. **strip()** - Remove whitespace
|
||||
4. **replace()** - Substitute text
|
||||
5. **upper(), lower()** - Change case
|
||||
|
||||
## List Methods
|
||||
1. **append()** - Add item to end
|
||||
2. **extend()** - Add multiple items
|
||||
3. **insert()** - Add item at specific position
|
||||
4. **remove()** - Delete by value
|
||||
5. **pop()** - Remove by index
|
||||
|
||||
## Dictionary Methods
|
||||
1. **get()** - Retrieve value safely
|
||||
2. **keys(), values(), items()** - Access dictionary components
|
||||
3. **update()** - Merge dictionaries
|
||||
|
||||
## File Operations
|
||||
1. **open()** - Access files
|
||||
2. **read(), write()** - File I/O operations
|
||||
3. **with** statement (context manager)
|
||||
|
||||
## From Standard Libraries
|
||||
1. **datetime.datetime()** - Date/time handling
|
||||
2. **random.randint(), random.choice()** - Generate random values
|
||||
3. **os.path.join()** - File path manipulation
|
||||
4. **json.loads(), json.dumps()** - JSON processing
|
||||
5. **re.search(), re.findall()** - Regular expressions
|
||||
|
||||
## From Third-Party Libraries
|
||||
1. **pandas.DataFrame()** - Data analysis
|
||||
2. **numpy.array()** - Numerical computing
|
||||
3. **matplotlib.pyplot.plot()** - Data visualization
|
||||
|
||||
Mastering these functions will give you a solid foundation for most Python programming tasks.
|
||||
Reference in New Issue
Block a user