Question: I might be missing something very small here as well: target_0 = ['1776','488','190'] def get_new_batch_actors(selected_actors:list): for i in range(len(selected_actors)): Movie_id_list_1 = get_Movie_ids(tmdb_api_utils.get_movie_credits_for_person(person_id = str(selected_actors[i]) ,

I might be missing something very small here as well:

target_0 = ['1776','488','190']

def get_new_batch_actors(selected_actors:list):

for i in range(len(selected_actors)):

Movie_id_list_1 = get_Movie_ids(tmdb_api_utils.get_movie_credits_for_person(person_id = str(selected_actors[i]) , vote_avg_threshold = 8))

for j in range(len(Movie_id_list_1)):

results = []

movie_cast = get_Cast_Members(tmdb_api_utils.get_movie_cast(movie_id=str(Movie_id_list_1[j]) , limit = 3))

Co_Act_id = get_Co_Act_id(movie_cast)

for co_Actin Co_Act_id:

print(co_Act)

When printing I can see the elements but no matter what I have done for saving and return them inside the function them hasn't worked, I only get the first element only.

get_new_batch_actors(target_0) => when it is with print

I get:

5064 1776 488 1776 2559324 1776 27888 3037 4951 

When I alter it as below:

def get_new_batch_actors(selected_actors:list):

for i in range(len(selected_actors)):

Movie_id_list_1 = get_Movie_ids(tmdb_api_utils.get_movie_credits_for_person(person_id = str(selected_actors[i]) , vote_avg_threshold = 8))

for j in range(len(Movie_id_list_1)):

results = []

movie_cast = get_Cast_Members(tmdb_api_utils.get_movie_cast(movie_id=str(Movie_id_list_1[j]) , limit = 3))

Co_Act_id = get_Co_Act_id(movie_cast)

for co_Actin Co_Act_id:

results.append(co_Act)

return results

I only get one number.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!