Skip to content

Instantly share code, notes, and snippets.

@chwnam
Created March 29, 2022 08:48
Show Gist options
  • Save chwnam/7a59cce4a91ffddb11700314ce7b1fa4 to your computer and use it in GitHub Desktop.
Save chwnam/7a59cce4a91ffddb11700314ce7b1fa4 to your computer and use it in GitHub Desktop.
화이트스페이스의 함정
#!/usr/bin/env python3
k1 = 'ABCDEag=='
k2 = 'ABCDEag==​​​'
print('Length of k1:', len(k1))
print('Length of k2:', len(k2))
print('--- k1:')
for c in k1:
print(c, ord(c))
print('')
print('--- k2:')
for c in k2:
print(c, ord(c))
@chwnam
Copy link
Author

chwnam commented Mar 29, 2022

Result:

Length of k1: 9
Length of k2: 12
--- k1:
A 65
B 66
C 67
D 68
E 69
a 97
g 103
= 61
= 61

--- k2:
A 65
B 66
C 67
D 68
E 69
a 97
g 103
= 61
= 61
 8203
 8203
 8203

@chwnam
Copy link
Author

chwnam commented Mar 29, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment