Bisix

2n.1n.py

Feb 22nd, 2021 (edited)
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. str = 'akugantengkalopasgelap'
  2.  
  3. for i in range(0, len(str), 2):
  4.     p1 = str[:i]
  5.     s1 = '.'.join(p1[x:x + 2] for x in range(0, len(p1), 2))
  6.     s2 = '.'.join(str[i:])
  7.     print(f'{s1}.{s2}'.lstrip('.'))
Add Comment
Please, Sign In to add comment