How to make a request and search for a string

0

I would like to know how to give a request and look for a string, for example: * www.site.com / index.php? id = '(SQL Error) (look for or error)

asked by anonymous 08.08.2018 / 23:01

1 answer

0

In python objects of type str have search methods, some of them follow:

>>> string = 'goiaba'
>>> string.find('a') # Retorna a primeira ocorrência da string passada
3
>>> string.startswith('g') # Verifica se a string começa com a string passada
>>> string.endswith('ba') # Verifica se a string termina com a string passada
    
09.08.2018 / 00:13