您的位置: 首页 > IT文章 > python-判断 python-判断 分类: IT文章 • 2024-06-30 19:26:43 python中非空即真,非0即真 True: "1" [1] {k-v} False: None [] {} username = input("username:").strip()if username: print("username不为空")else: print("username为空")