Class 12 IT tuition · explained simply
Python functions and files
Reading the whole chapter…
The very first time anyone opens this chapter, it takes about a minute to prepare. After that it opens instantly for everyone.
What this chapter covers
- Why functions help
- Defining and calling functions
- Arguments and parameters: positional, default, keyword
- Returning values
- Scope of variables: local and global
- Built-in functions and modules
- Exception handling: try, except, finally
- Text files: open, read, write, close
- Binary files with pickle
- CSV files with the csv module
- File paths and the with statement