Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- str = 'akugantengkalopasgelap'
- for i in range(0, len(str), 2):
- p1 = str[:i]
- s1 = '.'.join(p1[x:x + 2] for x in range(0, len(p1), 2))
- s2 = '.'.join(str[i:])
- print(f'{s1}.{s2}'.lstrip('.'))
Add Comment
Please, Sign In to add comment