3 ms·
> In most cases, Python and other weakly-typed languages will do everything they can to fit the data you're providing with what the code is expecting. This mean
by a3n 10y ago
> In most cases, Python and other weakly-typed languages will do everything they can to fit the data you're providing with what the code is expecting. This means converting strings to numbers ...
Python is strongly typed, as well as dynamically typed.
In [11]: 1 + '1'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-861a99da769e> in <module>()
----> 1 1 + '1'
TypeError: unsupported operand type(s) for +: 'int' and 'str'