- grub2 using wrong /boot partition
- bash loop through list of strings
- How to remove a single command from TCSH history?
- Why would be several partitions be of any good for servers?
- Unable to enable SMART support for external hard drive
- Find the right device to reverse-engineer
- CentOS 7.5 losing static IP on reboot
- Minimum image size for scanning/recognizing faces in a list?
- Presenting low scores to users - emotional impact
- Is there a name for a song that describes a dance?
- redundancy of term age level
- Is this grammatically correct? “Martin heard footsteps rushing towards his office.”
- “Quintessential Example”
- “at” or “in” the same visit?
- What is the difference between 'which' and 'that'?
- What is a word that could imply both “surplus” or “deficit”?
- A laser with/of frequency 25THz? On/in the excited state?
- What term describes pretending outrage to escape a conversation?
- How to add emotion to your conversation?
- Correct comma usage in a list with groups
How would i use python generator to have cleaner code
I'm trying to figure out a way to run this same exact script with less line of code, as you can see i have multiple functions that are quite identical, but it is necessary for the logic.
What should i do to make it look more cleaner ?
this is what i have so far
search_item = input("Input The Search Item: ")
location = input("Location:")
second_location = input("Second Location:")
third_location = input("Third Location:")
# city = [
# "Los Angeles", "Chicago", "Houston", "Phoenix", "Philadelphia", "San Antonio", "Fort Worth",
# "San Diego", "Dallas", "San Jose", "Austin", "Columbus", "Indianapolis", "Seattle", "St. Paul", "Nashville",
# "Louisville", "Plano"
# rancity = random.choice(city)
name = "yellow"
# start_urls = [
# "https://www.yellowpages.com/search?search_terms=" + search_item + "&geo_location_terms=" + location
# # "https://www.yellowpages.com/search?search_te