What does 'w', 'r', and 'a' mean in Python Files Topic?

·

1 min read

Meaning of 'w', 'r', and 'a' in Python Programming Language:

  • 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.