Splitting Strings || python || challenge

Splitting Strings || python || challenge

Data :

No alt text provided for this image


  1. Your boss at the Poetry organization sent over a bunch of author names that he wants you to prepare for importing into the database. Annoyingly, he sent them over as a long string with the names separated by commas.

Using?.split()?and the provided string, create a list called?author_names?containing each individual author name as it’s own string.

No alt text provided for this image


2. but now it turns out they didn’t want poet’s first names (why didn’t they just say that the first time!?)

Create another list called?author_last_namesthat only contains the last names of the poets in the provided string.

No alt text provided for this image

要查看或添加评论,请登录

社区洞察

其他会员也浏览了