Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

telephone number word generator python

numbs = {'2':'ABC', '3':'DEF', '4':'GHI', '5':'JKL', '6':'MNO', '7':'PQRS', '8':'TUV', '9':'WXYZ'}

def combo(phnum):
    if len(phnum) == 1: return list(numbs[phnum[0]])
    else: result = combo(phnum[:-1])
    return [(ch1+ch2) for ch1 in result for ch2 in numbs[phnum[-1]]]
Comment

PREVIOUS NEXT
Code Example
Python :: write a variable and assin a string to it 
Python :: python discover methods of object/module 
Python :: python get_loc not returning number 
Python :: add halt for 10 seconds in selenium python 
Python :: tkinter mouse loading cursor 
Python :: korozif 
Python :: openpyxl iter_rows skip first 
Python :: pandas parameters read 
Python :: same quotes in a quotes 
Python :: python generate sine wave pyaudio 
Python :: Hewwo wowwd 
Python :: Freqtrade - sell after x candels 
Python :: what is python virtual environment 
Python :: python default summary statistics for all columns 
Python :: terneray operator in python 
Python :: How do I know which animation is playing animation player 
Python :: how to sum 2 no.s in python 
Python :: python numpy 
Python :: launch application from python 
Python :: requests encoding python 
Python :: python hide terminal 
Python :: login view django 
Python :: convert dictionary to string 
Python :: round to 3 significant figures python 
Python :: python create empty dictionary with keys 
Python :: rename folder python 
Python :: python return 
Python :: list slicing reverse python 
Python :: python object creation 
Python :: rabbitmq python 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =