Python Forum
integer representing a 10-digit phone number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
integer representing a 10-digit phone number
#4
@ichabod801 - my sincere apologies...of course I completely botch up my very first post. I was hasty in my post because I was running out the door to work. Next time I will be clear about what I have tried, and what I am struggling with to be exact.

Thank you for your patience while I fumble my way through using the forum.

I was able to figure out my issue...below is my code:

phone_number = input()

print(phone_number[0] + phone_number[1] + phone_number[2] + '-' + phone_number[3] + phone_number[4] + phone_number[5] + '-' + phone_number[6] + phone_number[7] + phone_number[8] + phone_number[9])
Reply


Messages In This Thread
RE: integer representing a 10-digit phone number - by critter70 - May-13-2019, 08:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  list digit into number Voldyy 2 1,578 Jul-10-2022, 06:13 PM
Last Post: deanhystad
  Frequency in first digit from csv file, NO IMPORT bryan0901 6 2,902 May-28-2020, 09:50 AM
Last Post: bryan0901
  Four-digit number text translation. soz 3 2,723 May-13-2019, 03:02 PM
Last Post: buran
  create three digit numbers Krszt 4 4,550 Dec-09-2018, 03:12 PM
Last Post: ThePhi
  Sum of digit in a string MEH012 1 9,534 Apr-20-2018, 02:13 AM
Last Post: Larz60+
  Allow only digit penoxcz 3 3,846 Nov-14-2017, 03:04 PM
Last Post: wavic
  Four digit combinations EHod 4 7,842 Aug-13-2017, 09:14 PM
Last Post: EHod

Forum Jump:

User Panel Messages

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