인프런 파이썬 중급 - 시퀀스
- 노트필기/파이썬
- 2021. 5. 2.
In [178]:
# 시퀀스형
In [179]:
# 컨테이너(Containd -> 서로 다른 자료형을 담을 수 있음: list, tuple, collections.deque)
# a = [3, 3.0, 'a']
# 플랫(Flat : 한개의 자료형[str, bytes, bytearray, array.array, memoryview])
#가변형 : List, bytearray, array.array, memoryview, deque
#불변(tuple, str, byte)
In [180]:
# 지능형 리스트 Comprehending List
chars = '+_)(*&^%$#@!~)'
chars[2] = 'h'
#불변형이라 못바꿈
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-180-f94f7dd8e96b> in <module>
3 chars = '+_)(*&^%$#@!~)'
4
----> 5 chars[2] = 'h'
6 #불변형이라 못바꿈
TypeError: 'str' object does not support item assignment
In [196]:
chars = '+_)(*&^%$#@!~)'
code_list1 = []
for s in chars:
#유니코드 리스트
code_list1.append(ord(s))
print(code_list1)
[43, 95, 41, 40, 42, 38, 94, 37, 36, 35, 64, 33, 126, 41]
In [197]:
code_list2 = [ord(s) for s in chars]
print(code_list2)
[43, 95, 41, 40, 42, 38, 94, 37, 36, 35, 64, 33, 126, 41]
In [198]:
#Comprehending Lists + Map, Filter
In [199]:
code_list3 = [ord(s) for s in chars if ord(s)>40]
print(code_list3)
[43, 95, 41, 42, 94, 64, 126, 41]
In [200]:
code_list4 = list(filter(lambda x : x>40, map(ord, chars)))
In [201]:
print(code_list4)
[43, 95, 41, 42, 94, 64, 126, 41]
In [202]:
print(code_list1)
print(code_list2)
print(code_list3)
print(code_list4)
print([chr(s) for s in code_list1])
print([chr(s) for s in code_list2])
print([chr(s) for s in code_list3])
print([chr(s) for s in code_list4])
[43, 95, 41, 40, 42, 38, 94, 37, 36, 35, 64, 33, 126, 41]
[43, 95, 41, 40, 42, 38, 94, 37, 36, 35, 64, 33, 126, 41]
[43, 95, 41, 42, 94, 64, 126, 41]
[43, 95, 41, 42, 94, 64, 126, 41]
['+', '_', ')', '(', '*', '&', '^', '%', '$', '#', '@', '!', '~', ')']
['+', '_', ')', '(', '*', '&', '^', '%', '$', '#', '@', '!', '~', ')']
['+', '_', ')', '*', '^', '@', '~', ')']
['+', '_', ')', '*', '^', '@', '~', ')']
In [ ]:
In [203]:
#Generator 사용
print(dir(chars))
# __iter__가 들어가 있으면 for 문 등에서 사용 가능
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
In [204]:
import array
# Generator : 한 번에 한 개의 항목을 생성(메모리 유지x
tuple_g = (ord(s) for s in chars)
print(tuple_g)
print(type(tuple_g))
<generator object <genexpr> at 0x000001C087CC8F20>
<class 'generator'>
In [205]:
print(next(tuple_g))
43
In [206]:
print(next(tuple_g))
95
In [207]:
print(next(tuple_g))
print(next(tuple_g))
print(next(tuple_g))
41
40
42
In [208]:
array_g = array.array('I', (ord(s) for s in chars))
print(type(array_g))
print(array_g)
print(array_g.tolist())
<class 'array.array'>
array('I', [43, 95, 41, 40, 42, 38, 94, 37, 36, 35, 64, 33, 126, 41])
[43, 95, 41, 40, 42, 38, 94, 37, 36, 35, 64, 33, 126, 41]
In [209]:
# 제너레이터 예제
print(('%s' % c + str(n) for c in ['A', 'B', 'C', 'D'] for n in range(1,21)))
<generator object <genexpr> at 0x000001C08AAF0CF0>
In [210]:
for s in ('%s' % c + str(n) for c in ['A', 'B', 'C', 'D'] for n in range(1,21)):
print(s)
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
A13
A14
A15
A16
A17
A18
A19
A20
B1
B2
B3
B4
B5
B6
B7
B8
B9
B10
B11
B12
B13
B14
B15
B16
B17
B18
B19
B20
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10
C11
C12
C13
C14
C15
C16
C17
C18
C19
C20
D1
D2
D3
D4
D5
D6
D7
D8
D9
D10
D11
D12
D13
D14
D15
D16
D17
D18
D19
D20
In [211]:
#리스트 사용할 때 주의
In [212]:
marks1 = [['~']*3 for _ in range(4)]
In [213]:
print(marks1)
[['~', '~', '~'], ['~', '~', '~'], ['~', '~', '~'], ['~', '~', '~']]
In [214]:
marks2 = [['~']*3]*4
In [215]:
print(marks2)
[['~', '~', '~'], ['~', '~', '~'], ['~', '~', '~'], ['~', '~', '~']]
In [216]:
marks1[0][1] = 'X'
print(marks1)
[['~', 'X', '~'], ['~', '~', '~'], ['~', '~', '~'], ['~', '~', '~']]
In [217]:
marks2[0][1] = 'X'
print(marks2)
[['~', 'X', '~'], ['~', 'X', '~'], ['~', 'X', '~'], ['~', 'X', '~']]
In [218]:
# 증명
print([id(i) for i in marks1])
print([id(i) for i in marks2])
[1926467082816, 1926467080256, 1926461356288, 1926461354624]
[1926461355968, 1926461355968, 1926461355968, 1926461355968]
In [ ]:
In [219]:
# 리스트 및 튜플 고급
# Unpacking
In [220]:
#b, a = a, b
In [221]:
print(divmod(100, 9))
print(divmod(*(100,9)))
print(*(divmod(100,9)))
(11, 1)
(11, 1)
11 1
In [222]:
x, y, rest = range(10)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-222-6451e26b2f46> in <module>
----> 1 x, y, rest = range(10)
ValueError: too many values to unpack (expected 3)
In [223]:
x, y, *rest = range(10)
In [224]:
print(x, y, rest)
0 1 [2, 3, 4, 5, 6, 7, 8, 9]
In [225]:
x, y, *rest = range(2)
print(x, y, rest)
0 1 []
In [226]:
x, y, *rest = 1, 2, 3
In [227]:
print(x, y, rest)
1 2 [3]
In [228]:
# Mutable(가변형) vs Immutable(불변)
l= (15, 20, 25)
m = [15, 20, 25]
print(l, id(l))
print(m, id(m))
l = l *2
m = m *2
print(l, id(l))
print(m, id(m))
l *= 2
m *= 2
print(l, id(l))
print(m, id(m))
(15, 20, 25) 1926457355200
[15, 20, 25] 1926465544320
(15, 20, 25, 15, 20, 25) 1926468088640
[15, 20, 25, 15, 20, 25] 1926462060288
(15, 20, 25, 15, 20, 25, 15, 20, 25, 15, 20, 25) 1926468071488
[15, 20, 25, 15, 20, 25, 15, 20, 25, 15, 20, 25] 1926462060288
In [229]:
# sort vs sorted
# reverse, key=Len, key=str.Lower, key=func...
In [230]:
# sorted : 정렬 후 새로운 객체 반환
# sort : 정렬 후 직접 변경
In [231]:
f_list = ['orange', 'apple', 'mango','papaya','lenmon','strawberry','coconut']
In [232]:
print('sorted - ', sorted(f_list))
print('sorted - ', sorted(f_list, reverse=True))
print('sorted - ', sorted(f_list, key=len))
print('sorted - ', sorted(f_list, key=lambda x: x[-1]))
print('sorted - ', sorted(f_list, key=lambda x: x[-1], reverse=True))
print(f_list)
sorted - ['apple', 'coconut', 'lenmon', 'mango', 'orange', 'papaya', 'strawberry']
sorted - ['strawberry', 'papaya', 'orange', 'mango', 'lenmon', 'coconut', 'apple']
sorted - ['apple', 'mango', 'orange', 'papaya', 'lenmon', 'coconut', 'strawberry']
sorted - ['papaya', 'orange', 'apple', 'lenmon', 'mango', 'coconut', 'strawberry']
sorted - ['strawberry', 'coconut', 'mango', 'lenmon', 'orange', 'apple', 'papaya']
['orange', 'apple', 'mango', 'papaya', 'lenmon', 'strawberry', 'coconut']
In [233]:
# sort 반환 값 확인 -> None
In [ ]:
In [234]:
print(f_list)
print('sort - ',f_list.sort(),f_list)
print('sort - ',f_list.sort(reverse=True),f_list)
print('sort - ',f_list.sort(key=len),f_list)
print('sort - ',f_list.sort(key=lambda x: x[-1]),f_list)
print('sort - ',f_list.sort(key=lambda x: x[-1],reverse=True),f_list)
['orange', 'apple', 'mango', 'papaya', 'lenmon', 'strawberry', 'coconut']
sort - None ['apple', 'coconut', 'lenmon', 'mango', 'orange', 'papaya', 'strawberry']
sort - None ['strawberry', 'papaya', 'orange', 'mango', 'lenmon', 'coconut', 'apple']
sort - None ['mango', 'apple', 'papaya', 'orange', 'lenmon', 'coconut', 'strawberry']
sort - None ['papaya', 'apple', 'orange', 'lenmon', 'mango', 'coconut', 'strawberry']
sort - None ['strawberry', 'coconut', 'mango', 'lenmon', 'apple', 'orange', 'papaya']
In [235]:
# List vs Array
# 리스트 기반 : 융통성, 다양한 자료형, 범용적 사용
# 숫자 기반 : 배열(리스트와 거의 호환)
In [ ]:
In [236]:
# 해시테이블
# Key에 Value를 저장하는 구조 __dict__
# key 값을 해싱 함수 -> 해쉬 주소 -> key에 대한 value 참조
In [237]:
# Dict 구조
In [238]:
print(__builtins__.__dict__)
# print(__builtins__)
{'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>), '__build_class__': <built-in function __build_class__>, '__import__': <built-in function __import__>, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'breakpoint': <built-in function breakpoint>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'compile': <built-in function compile>, 'delattr': <built-in function delattr>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'format': <built-in function format>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <bound method Kernel.raw_input of <ipykernel.ipkernel.IPythonKernel object at 0x000001C087C8A730>>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'locals': <built-in function locals>, 'max': <built-in function max>, 'min': <built-in function min>, 'next': <built-in function next>, 'oct': <built-in function oct>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'repr': <built-in function repr>, 'round': <built-in function round>, 'setattr': <built-in function setattr>, 'sorted': <built-in function sorted>, 'sum': <built-in function sum>, 'vars': <built-in function vars>, 'None': None, 'Ellipsis': Ellipsis, 'NotImplemented': NotImplemented, 'False': False, 'True': True, 'bool': <class 'bool'>, 'memoryview': <class 'memoryview'>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'classmethod': <class 'classmethod'>, 'complex': <class 'complex'>, 'dict': <class 'dict'>, 'enumerate': <class 'enumerate'>, 'filter': <class 'filter'>, 'float': <class 'float'>, 'frozenset': <class 'frozenset'>, 'property': <class 'property'>, 'int': <class 'int'>, 'list': <class 'list'>, 'map': <class 'map'>, 'object': <class 'object'>, 'range': <class 'range'>, 'reversed': <class 'reversed'>, 'set': <class 'set'>, 'slice': <class 'slice'>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'zip': <class 'zip'>, '__debug__': True, 'BaseException': <class 'BaseException'>, 'Exception': <class 'Exception'>, 'TypeError': <class 'TypeError'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'GeneratorExit': <class 'GeneratorExit'>, 'SystemExit': <class 'SystemExit'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'ImportError': <class 'ImportError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'OSError': <class 'OSError'>, 'EnvironmentError': <class 'OSError'>, 'IOError': <class 'OSError'>, 'WindowsError': <class 'OSError'>, 'EOFError': <class 'EOFError'>, 'RuntimeError': <class 'RuntimeError'>, 'RecursionError': <class 'RecursionError'>, 'NotImplementedError': <class 'NotImplementedError'>, 'NameError': <class 'NameError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'AttributeError': <class 'AttributeError'>, 'SyntaxError': <class 'SyntaxError'>, 'IndentationError': <class 'IndentationError'>, 'TabError': <class 'TabError'>, 'LookupError': <class 'LookupError'>, 'IndexError': <class 'IndexError'>, 'KeyError': <class 'KeyError'>, 'ValueError': <class 'ValueError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'AssertionError': <class 'AssertionError'>, 'ArithmeticError': <class 'ArithmeticError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'OverflowError': <class 'OverflowError'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, 'SystemError': <class 'SystemError'>, 'ReferenceError': <class 'ReferenceError'>, 'MemoryError': <class 'MemoryError'>, 'BufferError': <class 'BufferError'>, 'Warning': <class 'Warning'>, 'UserWarning': <class 'UserWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'FutureWarning': <class 'FutureWarning'>, 'ImportWarning': <class 'ImportWarning'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'BytesWarning': <class 'BytesWarning'>, 'ResourceWarning': <class 'ResourceWarning'>, 'ConnectionError': <class 'ConnectionError'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'NotADirectoryError': <class 'NotADirectoryError'>, 'InterruptedError': <class 'InterruptedError'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'TimeoutError': <class 'TimeoutError'>, 'open': <built-in function open>, 'copyright': Copyright (c) 2001-2020 Python Software Foundation.
All Rights Reserved.
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
for supporting Python development. See www.python.org for more information., 'license': See https://www.python.org/psf/license/, 'help': Type help() for interactive help, or help(object) for help about object., '__IPYTHON__': True, 'display': <function display at 0x000001C085EAA160>, 'get_ipython': <bound method InteractiveShell.get_ipython of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x000001C087C8AAF0>>}
In [239]:
# Hash 값 확인
t1 = (20, 20, (30, 40, 50))
t2 = (10, 20, [30, 40, 50])
In [240]:
print(hash(t1))
print(hash(t2)) #예외 발생함
# 불변형만 hash 가능
4944355041196391447
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-240-81a692323e7f> in <module>
1 print(hash(t1))
----> 2 print(hash(t2)) #예외 발생함
3
4 # 불변형만 hash 가능
TypeError: unhashable type: 'list'
In [241]:
# Dict Setdefault 예제
source = (('k1', 'val1'),
('k1', 'val2'),
('k2', 'val3'),
('k2', 'val4'),
('k2', 'val5')
)
In [242]:
new_dict1 = {}
new_dict2 = {}
# No use Setdefault
for k, v in source:
if k in new_dict1:
new_dict1[k].append(v)
else:
new_dict1[k] = [v]
print(new_dict1)
print()
# Use Setdefault
for k, v in source:
new_dict2.setdefault(k, []).append(v)
print(new_dict2)
{'k1': ['val1', 'val2'], 'k2': ['val3', 'val4', 'val5']}
{'k1': ['val1', 'val2'], 'k2': ['val3', 'val4', 'val5']}
In [243]:
# 주의
new_dict3 = {k: v for k, v in source}
print(new_dict3)
{'k1': 'val2', 'k2': 'val5'}
In [ ]:
In [244]:
# Dict -> key 중복 허용X, Set-> 중복 허용 X
In [245]:
# Immutable Dict
In [246]:
from types import MappingProxyType
In [247]:
d = {'key1' : 'value1'}
In [248]:
# Read only
d_frozen = MappingProxyType(d)
In [249]:
print(d, id(d))
print(d_frozen, id(d_frozen))
{'key1': 'value1'} 1926460979392
{'key1': 'value1'} 1926463878144
In [250]:
d['key2'] = 'value2'
print(d)
{'key1': 'value1', 'key2': 'value2'}
In [251]:
d_frozen['key2'] = 'value2'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-251-a9eeff4037b3> in <module>
----> 1 d_frozen['key2'] = 'value2'
TypeError: 'mappingproxy' object does not support item assignment
In [252]:
# Set을 Readonly로
s1 = {'Apple','Orange','Apple','Orange','Kiwi'}
s2 = set(['Apple','Orange','Apple','Orange','Kiwi'])
s3 = {3}
s4 = set()
s5 = frozenset({'Apple','Orange','Apple','Orange','Kiwi'})
In [253]:
print(type(s3))
<class 'set'>
In [254]:
s1.add('Melon')
print(s1)
{'Kiwi', 'Apple', 'Orange', 'Melon'}
In [255]:
s5.add('Melon')
print(s5) # 추가 불가
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-255-cd586a971cd4> in <module>
----> 1 s5.add('Melon')
2 print(s5) # 추가 불가
AttributeError: 'frozenset' object has no attribute 'add'
In [256]:
print(s1, type(s1))
print(s2, type(s2))
print(s3, type(s3))
print(s4, type(s4))
print(s5, type(s5))
{'Kiwi', 'Apple', 'Orange', 'Melon'} <class 'set'>
{'Kiwi', 'Apple', 'Orange'} <class 'set'>
{3} <class 'set'>
set() <class 'set'>
frozenset({'Kiwi', 'Apple', 'Orange'}) <class 'frozenset'>
In [257]:
# 선언 최적화
# 바이트 코드 -> 파이썬 인터프리터 실행
from dis import dis
print('-----')
print(dis('{10}'))
print('-----')
print(dis('set([10])'))
-----
1 0 LOAD_CONST 0 (10)
2 BUILD_SET 1
4 RETURN_VALUE
None
-----
1 0 LOAD_NAME 0 (set)
2 LOAD_CONST 0 (10)
4 BUILD_LIST 1
6 CALL_FUNCTION 1
8 RETURN_VALUE
None
In [258]:
# 지능형 집합(Comprehending Set)
In [259]:
from unicodedata import name
print('-----')
# print({chr(i) for i in range(0,256)})
print({name(chr(i),"") for i in range(0,256)})
-----
{'', 'LESS-THAN SIGN', 'LEFT-POINTING DOUBLE ANGLE QUOTATION MARK', 'MASCULINE ORDINAL INDICATOR', 'SUPERSCRIPT TWO', 'LATIN CAPITAL LETTER U WITH DIAERESIS', 'DIGIT TWO', 'FEMININE ORDINAL INDICATOR', 'AMPERSAND', 'LATIN SMALL LETTER E WITH ACUTE', 'LATIN CAPITAL LETTER A WITH CIRCUMFLEX', 'LATIN SMALL LETTER I WITH CIRCUMFLEX', 'LATIN CAPITAL LETTER P', 'DEGREE SIGN', 'INVERTED QUESTION MARK', 'LATIN CAPITAL LETTER O', 'LATIN SMALL LETTER A WITH CIRCUMFLEX', 'LATIN SMALL LETTER ETH', 'LATIN SMALL LETTER B', 'LOW LINE', 'LATIN CAPITAL LETTER O WITH STROKE', 'MULTIPLICATION SIGN', 'DIGIT NINE', 'RIGHT SQUARE BRACKET', 'LATIN SMALL LETTER E WITH CIRCUMFLEX', 'LATIN SMALL LETTER U WITH GRAVE', 'LATIN SMALL LETTER S', 'LATIN SMALL LETTER E WITH GRAVE', 'LATIN CAPITAL LETTER O WITH CIRCUMFLEX', 'LATIN CAPITAL LETTER Y WITH ACUTE', 'COLON', 'SOFT HYPHEN', 'LATIN CAPITAL LETTER I WITH CIRCUMFLEX', 'LATIN SMALL LETTER U WITH DIAERESIS', 'LATIN SMALL LETTER THORN', 'INVERTED EXCLAMATION MARK', 'VULGAR FRACTION ONE QUARTER', 'LATIN CAPITAL LETTER A WITH TILDE', 'LATIN SMALL LETTER C', 'LATIN SMALL LETTER A WITH RING ABOVE', 'LATIN CAPITAL LETTER Q', 'PLUS-MINUS SIGN', 'DIGIT EIGHT', 'EQUALS SIGN', 'LATIN CAPITAL LETTER I WITH ACUTE', 'DIGIT FIVE', 'NUMBER SIGN', 'MACRON', 'LATIN SMALL LETTER L', 'LATIN CAPITAL LETTER ETH', 'LATIN SMALL LETTER U WITH ACUTE', 'LATIN CAPITAL LETTER D', 'LATIN SMALL LETTER O WITH DIAERESIS', 'LATIN SMALL LETTER Y', 'LATIN CAPITAL LETTER AE', 'LATIN CAPITAL LETTER O WITH DIAERESIS', 'LATIN SMALL LETTER AE', 'CIRCUMFLEX ACCENT', 'LATIN SMALL LETTER O WITH ACUTE', 'GREATER-THAN SIGN', 'REVERSE SOLIDUS', 'LATIN CAPITAL LETTER J', 'LATIN CAPITAL LETTER B', 'LEFT CURLY BRACKET', 'LATIN CAPITAL LETTER Y', 'LATIN CAPITAL LETTER S', 'PILCROW SIGN', 'LEFT PARENTHESIS', 'COMMERCIAL AT', 'DIGIT SIX', 'LATIN CAPITAL LETTER A WITH GRAVE', 'LATIN CAPITAL LETTER U WITH GRAVE', 'DIGIT SEVEN', 'LATIN SMALL LETTER M', 'LATIN CAPITAL LETTER A WITH RING ABOVE', 'MIDDLE DOT', 'LATIN CAPITAL LETTER I WITH DIAERESIS', 'LATIN CAPITAL LETTER O WITH ACUTE', 'LATIN SMALL LETTER A WITH ACUTE', 'LATIN CAPITAL LETTER C WITH CEDILLA', 'LATIN CAPITAL LETTER A WITH ACUTE', 'QUOTATION MARK', 'LATIN SMALL LETTER A', 'LATIN CAPITAL LETTER O WITH GRAVE', 'APOSTROPHE', 'LATIN CAPITAL LETTER W', 'DIAERESIS', 'VERTICAL LINE', 'LATIN SMALL LETTER SHARP S', 'LATIN SMALL LETTER J', 'LATIN CAPITAL LETTER U', 'CENT SIGN', 'VULGAR FRACTION ONE HALF', 'LATIN CAPITAL LETTER Z', 'LATIN CAPITAL LETTER R', 'LATIN CAPITAL LETTER E WITH DIAERESIS', 'QUESTION MARK', 'LATIN SMALL LETTER X', 'DIVISION SIGN', 'LATIN SMALL LETTER N', 'ACUTE ACCENT', 'LATIN SMALL LETTER K', 'LATIN SMALL LETTER O WITH TILDE', 'SECTION SIGN', 'RIGHT PARENTHESIS', 'POUND SIGN', 'FULL STOP', 'LATIN CAPITAL LETTER E', 'LATIN SMALL LETTER A WITH TILDE', 'NOT SIGN', 'LATIN CAPITAL LETTER N', 'SEMICOLON', 'LATIN SMALL LETTER D', 'NO-BREAK SPACE', 'BROKEN BAR', 'LATIN CAPITAL LETTER E WITH GRAVE', 'LATIN CAPITAL LETTER M', 'SOLIDUS', 'RIGHT CURLY BRACKET', 'LATIN SMALL LETTER G', 'REGISTERED SIGN', 'PERCENT SIGN', 'LATIN CAPITAL LETTER F', 'LATIN SMALL LETTER U WITH CIRCUMFLEX', 'LATIN CAPITAL LETTER L', 'LATIN CAPITAL LETTER A WITH DIAERESIS', 'LATIN SMALL LETTER Y WITH ACUTE', 'LATIN SMALL LETTER E', 'LATIN SMALL LETTER U', 'LATIN SMALL LETTER T', 'LATIN CAPITAL LETTER U WITH ACUTE', 'LATIN SMALL LETTER Q', 'SUPERSCRIPT THREE', 'LATIN CAPITAL LETTER O WITH TILDE', 'LATIN SMALL LETTER I WITH ACUTE', 'LATIN SMALL LETTER I WITH GRAVE', 'RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK', 'LATIN SMALL LETTER N WITH TILDE', 'PLUS SIGN', 'LATIN SMALL LETTER O', 'VULGAR FRACTION THREE QUARTERS', 'LATIN CAPITAL LETTER U WITH CIRCUMFLEX', 'LATIN SMALL LETTER A WITH GRAVE', 'LATIN CAPITAL LETTER X', 'LATIN CAPITAL LETTER THORN', 'LEFT SQUARE BRACKET', 'LATIN CAPITAL LETTER K', 'LATIN SMALL LETTER O WITH STROKE', 'LATIN CAPITAL LETTER T', 'LATIN CAPITAL LETTER E WITH ACUTE', 'SPACE', 'LATIN SMALL LETTER P', 'YEN SIGN', 'LATIN SMALL LETTER R', 'LATIN CAPITAL LETTER I', 'COPYRIGHT SIGN', 'SUPERSCRIPT ONE', 'LATIN SMALL LETTER Y WITH DIAERESIS', 'LATIN SMALL LETTER I', 'LATIN CAPITAL LETTER I WITH GRAVE', 'GRAVE ACCENT', 'LATIN SMALL LETTER H', 'LATIN SMALL LETTER V', 'DIGIT THREE', 'LATIN SMALL LETTER Z', 'LATIN SMALL LETTER A WITH DIAERESIS', 'LATIN SMALL LETTER I WITH DIAERESIS', 'TILDE', 'LATIN SMALL LETTER O WITH CIRCUMFLEX', 'LATIN CAPITAL LETTER A', 'LATIN CAPITAL LETTER G', 'LATIN SMALL LETTER W', 'MICRO SIGN', 'LATIN CAPITAL LETTER N WITH TILDE', 'LATIN CAPITAL LETTER C', 'HYPHEN-MINUS', 'ASTERISK', 'COMMA', 'LATIN CAPITAL LETTER H', 'CEDILLA', 'LATIN CAPITAL LETTER E WITH CIRCUMFLEX', 'DOLLAR SIGN', 'LATIN CAPITAL LETTER V', 'LATIN SMALL LETTER E WITH DIAERESIS', 'LATIN SMALL LETTER O WITH GRAVE', 'EXCLAMATION MARK', 'DIGIT ZERO', 'LATIN SMALL LETTER C WITH CEDILLA', 'DIGIT FOUR', 'LATIN SMALL LETTER F', 'CURRENCY SIGN', 'DIGIT ONE'}
In [ ]: