I’m wondering why, in Python (at least Python 3, on several platforms), the sole instruction print(list[0])
prints list[0]
, though list
keyword is the list
class constructor.
If I execute print(list)
, we logically obtain <class 'list'>
, but I don’t understand why the subscript [0]
is literally printed?
2