Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Python2, list comprehension, join, split, zip
#python 2.7.12 string1 = "6392079|||| 1.0|03/09/2017|PARADIGM REAL-TIME REVEL INSULIN INFUSION PUMP|INSULIN INFUSION PUMP / SENSOR AUGMENTED|MEDTRONIC MINIMED|18000 DEVONSHIRE STREET||NORTHRIDGE|CA|91325||US|91325||MMT-723LNAH|MMT-723LNAH|||0LP|R|01/29/2014|OYC||Y" keys = ["Report key", "Device sequence number", "Date received", "Brand name"]; values = [key.strip() for key in string1.split("|") if key.strip()]; output = "\n".join([key + ": " + str(value) for key, value in zip(keys, values)]); print (output);
run
|
edit
|
history
|
help
0
http_request
Dictionary - convert to lowercase
Aufgabe 16
0dd08b977895229d09b4848e467a4e10162ed345de0b245922b3505909d33ead
wordscapes
single_digit
epicoaosdsoasd
Mounesh
MPS encoding
u