Python Forum

Full Version: Program to print: Last Name, ID, Mobile Number, All
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I completely understand. but can you give me some guidance on how to declare the variable I am asking please and then I will continue from there to complete the code and post it over here for feedback :)
personal_details = input('Enter personal_details')
That is fantastic micseydel. I will look into the tutorials and then post here any question that might be needed an answer from a more experience user than me
Hints: you can use the split() function to chop a long string into parts, using a delimiter. So for instance you can split once with a ;, and then split each part with :. You can keep these parts (name, phone...) together in a tuple that you add to a list. When you are asked about some person, you scan the list and find the tuple that contains the right name and print its elements.
Thank you very much for your help guys
Pages: 1 2