#this code is bugggy as hell for a lot of pokemon with double letters lol
Explore tagged Tumblr posts
Note
How does your thing work??? I thought at first you were reading the post in as a string and doing like a key-dictionary thing to match a pattern with a Pokémon name but it didn’t do it with the Ask containing the pokérap. I am v curious and would love to hear about it if you have time
Pokemon detected :
How does your thing work??? I thought at first you were reading the post in as a string and doing like a key-dictionary thing to match a pattern with a Pokémon name but it didn’t do it with the Ask containing the pokérap. I am v curious and would love to hear about it if you have time
Ralts !
#pokemon#pokemon detector#ask the detector#okay so basically#this code is bugggy as hell for a lot of pokemon with double letters lol#but#basically i have two functions#the first parses the text depending on a pokemons name#i have a name list#and it grabs the first name and goes letter by letter to see if it's in the right order in the text i input#then the code runs for every pokemon name in the list that's the second function#it's far from optimized but so long as no one sends me the entire bee movie script it takes maybe .5 secs to run#and it returns a random pokemon from the list of the pokemon names in the text and then i have a thing that tells me if a specific pokemon#is in the list#bc sometimes i wanna be funny but a 10 lines text will give me like 900 pokemon#you can dm me for the code if you want lol it's not something i hold close or wtv it took me maybe a half hour
10 notes
·
View notes