I have a list with the following values: ["hello", "world", "new", "life", "good"]
. What I want to do is print the string along with the list like: My List values are: ["hello", "world", "new", "life", "good"]
.
I tried using inspect mylist
. However, this adds backslashes to the list: "My List values are: [\"hello\", \"world\", \"new\", \"life\", \"good\"]"
.
Can someone guide me please? If there isn’t any perfect solution to this, can someone guide me as to how we can remove the backslashes? String.replace
isn’t working for me.