Python Forum
Program to print: Last Name, ID, Mobile Number, All
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program to print: Last Name, ID, Mobile Number, All
#11
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 :)
Reply
#12
personal_details = input('Enter personal_details')
Reply
#13
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
Reply
#14
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.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#15
Thank you very much for your help guys
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Program to check whether a number is palindrome or not PythonBoy 18 2,468 Sep-12-2023, 09:27 AM
Last Post: PythonBoy
  Python Program to Find the Factorial of a Number elisahill 2 1,382 Nov-21-2022, 02:25 PM
Last Post: DeaD_EyE
  Program that allows to accept only 10 integers but loops if an odd number was entered gachicardo 4 3,548 Feb-24-2022, 10:40 AM
Last Post: perfringo
  How can I print the number of unique elements in a list? AnOddGirl 5 3,194 Mar-24-2020, 05:47 AM
Last Post: AnOddGirl
  Print the Largest Odd Number Than999 5 4,127 Jul-24-2019, 11:35 AM
Last Post: jefsummers
  Program that, inside a loop, does multiple things. needs to print in a certain way reidmcleod 1 2,638 Feb-19-2019, 02:35 PM
Last Post: marienbad
  How to print a statement if a user's calculated number is between two floats Bruizeh 2 2,349 Feb-10-2019, 12:21 PM
Last Post: DeaD_EyE
  Program that displays the number with the greatest amount of factors ilusmd 3 2,772 Nov-01-2018, 08:28 PM
Last Post: ichabod801
  Print only number penoxcz 1 2,546 Nov-10-2017, 11:04 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020