<AptiCode/>

Question 492: What is the purpose of thejson.dumps()function?

tcs
wipro
infosys
general
aptitude
standard-libraries
python-programming

Thejson.dumps()function is used to encode Python objects into a JSON-formatted string, allowing you to serialize data for storage or transmission.