What does the “w” mean in open(filename, “w”)?

w stands for writing permission for the opened file

open(name[, mode[, buffering]])

Looking at the signature we can (often) understand what each argument does more info here

Leave a Comment