water_alarm_source['analog_value'] = int(str(i['analog_value1']))/1000其中 i['analog_value1'] 取出来的类型为 unicode,想要转换成int类错误:
"data": "invalid literal for int() with base 10: '100.0'"
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
float()
sumber_penggera_air['nilai_analog'] = terapung(str(i['nilai_analog1']))//1000
int(float('100.0'))
float()
sumber_penggera_air['nilai_analog'] = terapung(str(i['nilai_analog1']))//1000