Question: Exercise 6 . 3 . 6 Last Names = = = = = = = = = = = = = = = = =

Exercise 6.3.6 Last Names
=========================
In this exercise, you will start with the following list of names:
names =[
"Maya Angelou",
"Chimamanda Ngozi Adichie",
"Tobias Wolff",
"Sherman Alexie",
"Aziz Ansari"
]
Use a list comprehension to print a list of just the last names.
Hint: You can use an index not only on a list variable, but also on an expression that returns a list!
So if x has a method called list_method that returns a list, you can get the 0th thing in the resulting list like this:
... x.list_method()[0]...
Hint #2: You'll need to use the split method!
Last names are the last part of the name.
"""
names =["Maya Angelou","Chimamanda Ngozi Adichie","Tobias Wolff","Sherman Alexie","Aziz Ansari"]
# Your code here...
def split_name_lists(a_list):
return

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 Databases Questions!