2-5
2428 ワード
2-5
'''
result = 1 if else 2
: result = 1
: result = 2
'''
a, b, c = 1, 3, 5
d = a if a > b else c
print(d)
# , :
if a > b: d = a
else: d =c
print(d)
'''
H
0X
'''
print(0X53)
print(0x53)
'''
bytes
python3 。
unicode, str
bytes
->bytes , encode
bytes -> , decode
'''
test = ' '.encode('utf-8')
print(test)
test = b'\xe6\x88\x91\xe7\x88\xb1\xe5\x8c\x97\xe4\xba\xac\xe5\xa4\xa9\xe5\xae\x89\xe9\x97\xa8'.decode('utf-8')
print(test)