no message

This commit is contained in:
yinjun.chen1
2026-09-17 15:29:38 +08:00
parent 91e7103103
commit 8ad2a088fc
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
# 用于检查一个对象是否是指定类型(或其子类)的实例
f = input('请输入:')
print(type(f))
print(isinstance(f,str))
print('---')
print(isinstance(eval(f),int))
# 用于检查一个对象是否是指定类型(或其子类)的实例
+1
View File
@@ -1,3 +1,4 @@
# None是个常亮 是NoneType类型的唯一实例
# 表示完全没有值
# None 不是0,不是空字符串””,也不是False
# 当不确定变量数据类型时,可以使用type指令反馈变量类型
+1 -1
View File
@@ -5,4 +5,4 @@ hello3
hello4
'''
st1= 'xxx'
print(st1+12)
print(isinstance(st1,str))