In this article we will see how we can get the alternate names of the person from the person object, alternate names are basically nick names given to them or stage name i.e name by which they are called, imdb person object act similar to dictionary therefore getting image from person object is similar from getting required information from the dictionary.
In order to do this we have to do the following –
1. Get the person object with the help of id by using get_person method
2. Get the alternate names from it using result[‘akas’] as keys
3. Print the result
Note : Output will be the link of the image i.e string data type not actual image
Below is the implementation
Nawazuddin Siddiqui ['Nawazuddin', 'Novaz', 'Nowaz', 'Nawazuddin Siddique', 'Nawaz Uddin']
Shahid Kapoor ['Shahid Kapur', 'Shahid']
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.