标签:code www. div question actual www 分享 tps lin
装载: https://www.zhihu.com/question/19918532
> "1"+2 ‘12‘
>>> "1"+2 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: cannot concatenate ‘str‘ and ‘int‘ objects
>>> a = 1 >>> type(a) <type ‘int‘> >>> a = "s" >>> type(a) <type ‘str‘>
Prelude> let a = "123" :: Int <interactive>:2:9: Couldn‘t match expected type `Int‘ with actual type `[Char]‘ In the expression: "123" :: Int In an equation for `a‘: a = "123" :: Int
标签:code www. div question actual www 分享 tps lin
原文地址:http://www.cnblogs.com/bincoding/p/7337983.html