Set a single attribute for the symbols

and

:
SetAttributes adds to the already existing attributes;
Attributes[g]={..} resets the list:
SetAttributes is equivalent to this assignment to the attributes:
Use
ClearAttributes to clear a particular attribute:
Protecting a symbol is equivalent to setting the
Protected attribute:
After setting the attribute
Locked, no more changes to the attributes can be made:
A locked symbol can no longer be unprotected, as the
Protected attribute cannot be cleared:
This sets attributes of the symbol

itself:
This sets the attributes of all symbols in the list

: