
나의 코드
import Foundation
let s1 = readLine()!
for s in s1 {
print(s)
}
적을 내용이 없다. 이것도 다른 표현이 있어 적어둔다.
import Foundation
print(readLine()!.map { String($0) }.joined(separator: "\n"))
//
import Foundation
guard let s1 = readLine() else { fatalError() }
s1.forEach { print($0) }
//
import Foundation
let s1 = readLine()!
s1.map { print($0) }
//
Array(readLine()!).forEach{ print($0) }
//
import Foundation
let s1 = readLine()!
for i in 0...s1.length - 1 {
print("\(s1[String.Index(encodedOffset: i)])")
}
PREVIOUS7. 문자열 붙여서 출력하기
NEXT9. 홀짝 구분하기