s1= str( s[1:])*6.3746
错误显示:TypeError: can't multiply sequence by non-int of type 'float'
要如何修改?
s1= str( s[1:])*6.3746
错误显示:TypeError: can't multiply sequence by non-int of type 'float'
要如何修改?
要么将字符串转成浮点数 s1 = float(str(s[1:])) * 6.3746
要么将后面的浮点数转成整数 表示前面的字符串重复运算 str(s[1:])*int(6.3746)