Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

Which has a default value of null? boolean int String double

Answered: 1 week ago