Computer Science
Function can alter only mutable data types.
Python Functions
2 Likes
Answer
True
Reason — Functions can alter only mutable data types because mutable data types in Python can be modified in-place, meaning their internal state can be changed by functions. This includes data types like lists, dictionaries, and sets. On the other hand, immutable data types, such as strings, tuples, and numbers, cannot be altered in-place.
Answered By
1 Like