Posts by Conection47 • 61 points
4 posts
-
1
votes2
answers326
viewsQ: Regex to capture links from sites specific to an HTML page
My goal was to make a Rawler web that found links (in many ways, but starting with http/s) in the HTML page of a site, I used requests and regular expressions, a part of the code went like this:…
-
1
votes1
answer27
viewsQ: Why should this repeating structure that should turn a word upside down not come back at all?
phrase = str(input("Type your phrase: ")).upper().strip() words_phrase = phrase.split() words_together = ''.join(words_phrase) phrase_inverse = "" for letra in range(len(words_together) - 1, -1,…
-
-1
votes1
answer39
viewsQ: How do I consider just what number a user enters in an input? (python)
rabanada = int(input("Quantos quilos você pesa? ")) if rabanada > 100000: print("Você é gordo") else: print("Você tá magro, rlx") If the user type: "100 kilos", as I do for the program consider…
-
0
votes2
answers2416
viewsQ: How to get the first word of a text in Python?
frase = str("Eu como abacaxi").split() How do I show only the first word of the phrase ("I" in case)?