ou use:
public
scope to make that property/method available from anywhere, other classes and instances of the object.
private
scope when you want your property/method to be visible in its own class only.
protected
scope when you want to make your property/method visible in all classes that extend current class including the parent class.
If you don't use any visibility modifier, the property / method will be public.
More: (For comprehensive information)
I'm getting an IndentationError (or a TabError). How do I fix it?
How do I clone a list so that it doesn't change unexpectedly after assignment?
List of lists changes reflected across sublists unexpectedly
How to test multiple variables for equality against a single value?
How do I create variable variables?
Asking the user for input until they give a valid response
How can I access and process nested objects, arrays, or JSON?