<|im_start|>user
Can you provide an example of a Python script that demonstrates file handling?<|im_end|>
<|im_start|>assistant
```python
# This script reads a text file, counts the number of lines, and writes the count to a new file.
input_file = 'input.txt'
output_file = 'output.txt'<|im_end|>

<|im_start|>user
Can you provide an example of a Python script that demonstrates file handling?<|im_end|>
<|im_start|>assistant
```python
# This script is about file handling.
open('input.txt', 'r')  # Open the file for reading.
data = open('input.txt').read()  # Read the file.
lines = data.splitlines()  # Split the data into lines.
print('Line count')  # This prints a message.
print(len(lines))  # Print the line count.
open('output.txt', 'w').write('Line count:')  # Open another file to write.
open('output.txt', 'w').write(str(len(lines)))  # Write the line count again.
```<|im_end|>

Can you provide an example of a Python script that demonstrates file handling?