E
E
eternal_blue2020-10-19 15:19:47
Python
eternal_blue, 2020-10-19 15:19:47

Is there python with loose typing?

Hello, I needed to write a small program in python, and therefore I had to learn it, and I was very unpleasantly dumbfounded. What do you mean I can't write like this:

a = 12
print('a равно '+a)

The concatenation operators don't work at all as expected, and I think later on, in a more complex project, this will bring a lot of surprises in unexpected places...
Is there any way to turn on automatic conversions, like in js?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dr. Bacon, 2020-10-19
@eternal_blue

It is forbidden.

at the stage of a more complex project, it will bring many surprises in unexpected places
just lax typing will pile up these surprises.
Learn Python further, there are 5 ways to format strings, concatenation is considered quite bad.

S
Sergey Gornostaev, 2020-10-19
@sergey-gornostaev

Weak typing for weak programmers.

D
dooMoob, 2020-10-19
@dooMoob

Concatenation operators don't work at all as expected

Well, you should probably read the documentation before you start writing code, especially when moving from such an inadequate language as JS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question