This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests #Peticiones a una API | |
response = requests.get("https://pokeapi.co/api/v2/pokemon?limit=151")#trae los primeros 151 pokemon | |
print(response.status_code) #200 | |
print(response.json()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pattern = r"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Del siguiente arreglo, eliminar los duplicados | |
const numeros = [10,20,30,40,50,10,20] | |
const noDuplicados = new Set(numeros); | |
console.log(noDuplicados); //10,20,30,40,50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const regex = /^$|^\w+([.-_+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/ |