Skip to content

Commit

Permalink
phonenumber
Browse files Browse the repository at this point in the history
  • Loading branch information
thenu97 committed Feb 24, 2020
1 parent ef6219b commit 43c09f8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions phonenumber.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python3.8

def create_phone_number(n):
f = "".join(map(str, n[0:3]))
s = "".join(map(str, n[3:6]))
t = "".join(map(str, n[6:10]))

return "(" + f + ") " + s + "-" + t


print(create_phone_number([1,2,3,4,5,6,7,8,9,0]))

0 comments on commit 43c09f8

Please sign in to comment.