+ 7
Explain the difference
var word = "SoloLearn" print(word.count) print(word.characters.count)
4 Respostas
+ 7
Sorry, it is Swift 4
+ 7
Thanks Lord Krishna for precise answer
+ 4
characters.count is an old deprecated method from v2, v3
count is the current one available from v4
Otherwise, they appear to be the same. The longer one should be used for v2 & v3. Use the shorter one for v4.
https://stackoverflow.com/questions/24037711/get-the-length-of-a-string
+ 3
Is this even python ?