I'm playing with HackerRank. One of the problems I need to read from line to arrays of Integers:
A=(1,2,3)
B=(1,4,7)
I tried:
let line = readLine()
print(line)
But I get this error:
solution.swift:2:7: warning: expression implicitly coerced from 'String?' to Any
print(line)
^~~~
solution.swift:2:7: note: provide a default value to avoid this warning
print(line)
^~~~
?? <#default value#>
solution.swift:2:7: note: force-unwrap the value to avoid this warning
print(line)
^~~~
!
solution.swift:2:7: note: explicitly cast to Any with 'as Any' to silence this warning
print(line)
^~~~
as Any
Any of you knows how I suppose to read line and get the array?
I'll really appreciate you help