I made a script that returns me the names of online players of a given game Only I wanted to put the amount. How would this structure for quantity return be? I have already tried to create a list and with it use the len plus error function.
import requests
import json
def Expert_serve():
serve = "expert"
url = requests.get('http://infinite-flight-public-api.cloudapp.net/v1/Flights.aspx?apikey=78879b1d-3ba3-47de-8e50-162f35dc6e04&sessionid=7e5dcd44-1fb5-49cc-bc2c-a9aab1f6a856')
response = url.json()
for i in range(100):
if "IFATC" in response[i]["DisplayName"]:
print(response[i]['DisplayName'])
teste = (Expert_serve())
print ('Jogadores online {}'.fotmat (len(teste))