0

When I want to convert other types into a string, I can use explicit transformation: string() and implicit transformation print(\()), right?

But I get a unwanted answer when I use \() while I'm printing my answer, and here is the picture, do you know why it is?

enter image description here

here is my code:

import Foundation
let a = "hello"
let b = String(a.characters.reversed())
print(b)
print("\(a.characters.reversed())")
let c = 0.9
print("\(c)")
user7341005
  • 285
  • 1
  • 3
  • 13

0 Answers0