Python, computer programming, Programming Languages

Write a function lastfirst() that takes a list of strings as a parameter. Each string in the list has the format ''Last, First'' where Last is a last name and First is a first name. The function lastfirst() returns a list containing two sublists. The first sublist is a list of all the first names and the second sublist is a list of all the last names. The following shows how the function would be called on an example parameter:

>>> lastfirst([''Gerber, Len'', ''Fox, Kate'', ''Dunn, Bob'']
[[''Len'', ''Kate'', ''Bob''], [''Gerber'', ''Fox'', ''Dunn'']]
Posted Date: 2/20/2012 12:17:02 AM | Location : United States







Related Discussions:- Python, computer programming, Assignment Help, Ask Question on Python, computer programming, Get Answer, Expert's Help, Python, computer programming Discussions

Write discussion on Python, computer programming
Your posts are moderated
Related Questions
Problem Specification I/O programming is the \bread and butter", the raison d'etre, of microcontrollers. After all, our definition of a microcontroller is \a microprocessor wit

Question: (a) How do you implement the following in ASP.NET: (i) Server-side Comments (ii) Server-side Include Directives. (b) What is the purpose of a HashTable? (

Develop (i) a context diagram, and (ii) a use case diagram to model the following functionalities of an online brokerage house. eBroker is a discount online broker. An account h

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

1-Create ir3.py based on ir2.py 2-Repeatedly prompt the user for a query (if they enter "q", then quit) 3-Find the terms in the query, and calculate the appropriate weight fo

The last matrix operation which we'll see is matrix multiplication. Now there we will start along with two matrices, A nxp and B pxm . Remember hat A must have similar number of c

write a program to draw a cow. Now, draw a cow standing amongst the grass, with (say) 500 blades of grass. Each blade of grass should be a separate random green line. Do all your d

Design an application that opens and analyses word files. Requirements: Create an application that analyses text documents. It should open a text file, read each word into an ap

We want to create a structure that will represent a deck of cards (not necessarily full). Each card has a character (between '2' to '9' and 'T', 'J', 'Q', 'K', 'A') and a suit (dia

1. Logon to Linux. 2. Create a directory "Unix" under your home directory. Command(s): …………………………………………. 3. Create four sub-directories bin, conf, docs