Is it possible to create a dictionary like this?
data = {(136-00000-0001 : 072-00000-0001,072-00000-0002,072-00000-0003),
(136-00000-0002 : 072-00000-0002,072-00000-0003,072-00000-0004)}
text = input("Put your 072-XXXXX-XXXX number in here: ")
wrapper =[]
for number in text:
if number in data.keys()
wrapper.append(data[number]
for w in wrapper:
print(w, end=" ")
I have a wrapper called 136-xxxxx-xxxx where 3*072-xxxxx-xxxx are in it. All I want to do is, asking for a 072-xxxxx-xxxx number and the program is giving me the Wrapper number of it back.
For example:
- asking for 072-00000-0004
- answer -> it´s inside 136-00000-0002
The only way I know is, for example that morse thing, where
morse = {"a":".-", "b":"-..."
, but is there a way like this for my example at the top?