की जाँच करें अगर कुछ है एक स्ट्रिंग अजगर

कोड उदाहरण

14
0

N

>>> def hasNumbers(inputString):
...     return any(char.isdigit() for char in inputString)
... 
>>> hasNumbers("I own 1 dog")
True
>>> hasNumbers("I own no dog")
False
13
0

N

isinstance(s, str)
7
0

N

if "blah" not in somestring: 
    continue
3
0

N

type('hello world') == str
# output: True

type(10) == str
# output: False
0
0

N

if var in ('stringone', 'stringtwo'):
    dosomething()

इसी तरह के पन्ने

उदाहरणों के साथ समान पृष्ठ

अन्य भाषाओं में

यह पृष्ठ अन्य भाषाओं में है

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

इस श्रेणी में लोकप्रिय

श्रेणी में उदाहरण के साथ लोकप्रिय पृष्ठों