Working with Files
Understand how Python programs can read and write files. The browser example demonstrates the concept safely.
Learn by experimenting
Study the Python code, run it, change values and observe the output. Practical experimentation is an important part of learning programming.
Python Code
Python runs directly in your browser.
data = 'Vinsoft Lab Python Course'
print('Data to save:')
print(data)
print('In a normal Python application, this could be written to a file.')
Python Output
Program output appears here.
Test your understanding
Choose the best answer.
Which function can calculate the length of a Python list?