1 python
我正在尝试显示一个提供给定变量类型的字符串.
当我尝试以下内容时:
'This is a '+str(type(somevariable))
Run Code Online (Sandbox Code Playgroud)
输出是"This is a <type 'float'>",而不是"This is a float".
如何获得我想要的输出?
| 归档时间: |
|
| 查看次数: |
128 次 |
| 最近记录: |