“python se a string tiver espaços” Respostas de código

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

python se a string tiver espaços

In [1]: import re

In [2]: string = "Hello world"

In [3]: bool(re.search('\s', string))
Out[3]: True

In [4]: string = "World"

In [5]: bool(re.search('\s', string))
Out[5]: False
gdfelt

Respostas semelhantes a “python se a string tiver espaços”

Perguntas semelhantes a “python se a string tiver espaços”

Mais respostas relacionadas para “python se a string tiver espaços” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código