Menu
Coddy logo textTech

Create

Lesson 6 of 12 in Coddy's File Handling in Python course.

To create a new file in Python, use the open() method, with append ('a'), write ('w'), or create ('x') mode.

challenge icon

Challenge

Easy

Create a file named myfile.txt.

Try it yourself

# Write your code here

All lessons in File Handling in Python