Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
DreamPie 1.2.1
>>> xs = [
... [-1, -1, -1],
... [-1, 9, -1],
... [-1, -1, -1],
... ]
>>> xs
0: [[-1, -1, -1], [-1, 9, -1], [-1, -1, -1]]
>>> type(xs)
1: <class 'list'>
>>> xs[1]
2: [-1, 9, -1]
>>> type(xs[1])
3: <class 'list'>
>>> xs[1][1]
4: 9
>>> xs[1, 1]
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
xs[1, 1]
~~^^^^^^
TypeError: list indices must be integers or slices, not tuple
>>> xs = 'ahoj'
>>> ys = b'ahoj'
>>> xs
5: 'ahoj'
>>> ys
6: b'ahoj'
>>> type(xs)
7: <class 'str'>
>>> type(ys)
8: <class 'bytes'>
>>> for x in xs:
... print(x)
a
h
o
j
>>> for y in ys:
... print(y)
97
104
111
106
>>> chr(97)
9: 'a'
>>> for x in b'ahoj\xff':
... print(x)
97
104
111
106
255
>>>