Telegram Group & Telegram Channel
Python интернирует (переиспользует) строковые литералы, особенно короткие. Поэтому a is b возвращает True, так как обе переменные указывают на один и тот же объект в памяти. А вот c создаётся в рантайме с помощью join(), и хоть его значение такое же, объект в памяти другой, поэтому a is c возвращает False.



tg-me.com/quiz_python/3991
Create:
Last Update:

Python интернирует (переиспользует) строковые литералы, особенно короткие. Поэтому a is b возвращает True, так как обе переменные указывают на один и тот же объект в памяти. А вот c создаётся в рантайме с помощью join(), и хоть его значение такое же, объект в памяти другой, поэтому a is c возвращает False.

BY Python: задачки и вопросы


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/quiz_python/3991

View MORE
Open in Telegram


Python: задачки и вопросы Telegram | DID YOU KNOW?

Date: |

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.

Python: задачки и вопросы from us


Telegram Python: задачки и вопросы
FROM USA