【发布时间】:2012-01-05 17:09:15
【问题描述】:
Python : xx = "p" + "y" + str(3) => xx == "py3"
如何使用 Racket 获得相同的结果?
(string-append "racket" (number->string 5) " ")
在 Racket 中是否有另一种方法,类似于上面的 Python 示例,将数字附加到字符串?
【问题讨论】:
-
你试过你的 Python 例子了吗?
-
我尝试:TypeError:无法连接 'str' 和 'int' 对象。在这个问题之前,python 自动将数字强制转换为我脑海中的字符串
标签: python racket string-concatenation