Is there any mistake in this code and can you list them

import requests
from bs4 import BeautifulSoup
URL = ('')
page = requests.get(URL)
soup = BeautifulSoup(page.content,'html.parser')
results = soup.find(id='page')
names = results.find_all('span', class_='playerInfo')
#player_stuff = names.find('span', class_='playerName')
playerstufflist = []
for name in names:

  player_stuff = name.find('span', class_='playerName')
  if None in (player_stuff):
  playerstufflist . append(player_stuff.text)

xy = input("put the letter you want to be used here:" )
def names_a(playerstufflist):
  return playerstufflist.lower().startswith(xy)
filtered_names = filter(names_a,playerstufflist)

I have no idea what this code is supposed to do, so I don’t know if it has any mistakes or not. What are you trying to do with this code.

if you were to guess what do u think it is

Hi @samyprince!

The best I can tell is it has something to do with basketball. However, that really doesn’t help us that much. The more details you can provide and more specific you can be will help the community better assist you.

It looks like code that prints lots of stuff and involves BeautifulSoup.

I’m really bad at guessing games for uncommented code with no description. If you want help from someone, you’ll have to describe

  1. What this code is for

  2. What this code should be doing but isn’t

  3. What this code is doing but shouldn’t

1 Like

a friend of mine asked it what it is i posted it so you could give me an insight on what it is

Your guess is as good as mine it seems. You should ask your friend what this code is for.

kk thanks