VB 判断字符是否为数字字符
if IsNumeric( [TextString] ) then
a = Int ( [TextString] )
else
a=0
end if
python判断空
def FindLabel ( [结构], [楼层] ):
if [楼层]==None:
a=""+ [结构]
else:
a= [结构] + " " + [楼层]
return a
这篇博客探讨了在VB和Python中如何判断一个字符是否为数字字符。VB使用IsNumeric函数,而Python则通过简单的条件检查实现。文章还展示了在Python中处理空值的情况,提供了一个将结构和楼层信息组合的函数示例。
VB 判断字符是否为数字字符
if IsNumeric( [TextString] ) then
a = Int ( [TextString] )
else
a=0
end if
python判断空
def FindLabel ( [结构], [楼层] ):
if [楼层]==None:
a=""+ [结构]
else:
a= [结构] + " " + [楼层]
return a
3116

被折叠的 条评论
为什么被折叠?
