Mac address splitting and joining ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Mac address splitting and joining ?

Mac="11:22:33:44:55:66" expected output is like "1122.3344.5566"

17th Apr 2018, 2:44 PM
na1
2 Answers
+ 3
inp='11:22:33:44:55:66' inp=inp.split(':') print(*[''.join(inp[x:x+2]) for x in range(0,(len(inp)//2+2),2)],sep='.')
17th Apr 2018, 3:07 PM
Louis
Louis - avatar
0
thanks Louis
26th Apr 2018, 7:48 AM
na1