Table of Contents
Python Tutorial
Table of Contents
Python Tutorial
File Pointerr in Hindi
What is File Pointer in Python
File pointer एक position होता है, जो हमे दिखाता है कि हम file में किस जगह पर है, python में by default ये pointer किसी file के starting (यानि 0 index) पर होता है।
File Pointer Methods
python में file pointer के position के लिए f.tell() और f.seek() functions का use किया जाता है।
tell() Method
tell() method हमे file pointer का current position बताता है। जब file को open किया जाता है तो pointer का position 0 index (starting) पर होता है, but जब हम file में कुछ read या write करते है तो pointer move हो जाता है, ऐसे में हम tell() method का use करके pointer का current position देख सकते है।
seek() Method
seek() method का use करके हम pointer को किसी specific position पर ले जा सकते है। इसमे 2 parameter होते है-
- offset : हमे pointer को file में कितने bytes move करना है वो argument (number) हमे इसमे देंगे।
- whence : ये optional होता है जिसका by default value 0 होता है मतलब pointer file में beginning से move होगा। अगर हम इसमे 1 देंगे तो pointer अपने current position से move होगा, और अगर हमे 2 देंगे तो pointer उस file में end से move करेगा।
उम्मीद करते है कि आपको File Pointer अच्छे समझ मे आ गया होगा ये एक File Handling का topic है। अपने learning को continue रखने के लिए next button पर click करे,
- All Posts
- Artificial Intelligence
- Computer Fundamentals
- Computer Networks
- Data Analytics
- Data Science
- DBMS
- Deep Learning
- Digital Electronics
- DSA with Python
- Excel
- Exercise
- Git & Github
- Machine Learning
- Matplotlib
- Natural Language Processing
- NumPy
- Operating System
- Pandas-s
- Power BI
- Python Tutorial
- Scikit-learn
- Seaborn
- SQL & MySQL

Table of Contents All Chapters 1. Personal Area Network 2. Local Area Network 3. Campus Area Network 4. Metropolitan Area...

Table of Contents All Chapters 1. Data Communication 2. Types of Data Communication 2.1. Simplex 2.2....

Table of Contents All Chapters 1. Special Logic Gate 2. XOR Gate 2.1. XOR Gate Truth Table 3....

Table of Contents All Chapters 1. Universal Logic Gates 2. NOR Gate 2.1. NOR Gate Truth Table 3....

Table of Contents All Chapters 1. Logic Gate 2. AND Gate 2.1. AND Gate Truth Table 3. OR...

Table of Contents All Chapters 1. Simplification 2. Simplification using Boolean Algebra Theorems 3. Simplification using K-map Digital Electronics...

Table of Contents All Chapters 1. Identity Laws 2. Null Laws 3. Domination Laws 4. Idempotent Laws 5. Complement Laws...