#!/usr/bin/python3 str = "123456"; # Only digit in this string print (str.isdigit()) str = "this is string example....wow!!!" print (str.isdigit())
【Linux常用命令速查手册】关注【入门小站】,后台回复 「1001」 自取。