Meaning of 'w', 'r', and 'a' in Python Programming Language Files Topic ?
▪ It's really just a string with a character in it for the kind of mode for the file.
▪ If you use 'w', then you are saying "open this file in 'write mode" - hence
the 'w' character.
▪ There's also 'r' for "read," 'a' for append, and modifiers on these.
Top comments (2)
there're also
w+
,a+
andr+
to create file if not existentYes, Correct.
Thank you for sharing this🙏