✅ متغیرها (variables) متغیرها محفظههایی برای ذخیره مقادیر دادهها هستند.
🔴 ایجاد متغیرها پایتون هیچ فرمانی برای اعلان متغیر ندارد. یک متغیر در لحظهای ایجاد میشود که برای اولین بار یک مقدار به آن اختصاص میدهید. ⬅️مثال: x = 5 y = "John"
🟡 متغیرها نیازی به اعلان با نوع خاصی ندارند و حتی بعد از تنظیم میتوانند نوع خود را تغییر دهند. ⬅️ مثال: x = 4 # یک عدد است x x = "Sally" # یک رشته است x حالا print(x)
✅ انتخابکردن (casting) اگر میخواهید نوع داده یک متغیر را مشخص کنید، این کار را می توان با casting انجام داد.
x = str(3) y = int(3) z = float(3)
✅ نوع را دریافت کنید. شما می توانید نوع داده یک متغیر را با تابع type() دریافت کنید.
⬅️ مثال x = 5 y = "John" print(type(x)) print(type(y)) خروجی پایتون: <class 'int'> <class 'str'> 👈 ادامه دارد....
✅ متغیرها (variables) متغیرها محفظههایی برای ذخیره مقادیر دادهها هستند.
🔴 ایجاد متغیرها پایتون هیچ فرمانی برای اعلان متغیر ندارد. یک متغیر در لحظهای ایجاد میشود که برای اولین بار یک مقدار به آن اختصاص میدهید. ⬅️مثال: x = 5 y = "John"
🟡 متغیرها نیازی به اعلان با نوع خاصی ندارند و حتی بعد از تنظیم میتوانند نوع خود را تغییر دهند. ⬅️ مثال: x = 4 # یک عدد است x x = "Sally" # یک رشته است x حالا print(x)
✅ انتخابکردن (casting) اگر میخواهید نوع داده یک متغیر را مشخص کنید، این کار را می توان با casting انجام داد.
x = str(3) y = int(3) z = float(3)
✅ نوع را دریافت کنید. شما می توانید نوع داده یک متغیر را با تابع type() دریافت کنید.
⬅️ مثال x = 5 y = "John" print(type(x)) print(type(y)) خروجی پایتون: <class 'int'> <class 'str'> 👈 ادامه دارد....
"There are several million Russians who can lift their head up from propaganda and try to look for other sources, and I'd say that most look for it on Telegram," he said. "There is a significant risk of insider threat or hacking of Telegram systems that could expose all of these chats to the Russian government," said Eva Galperin with the Electronic Frontier Foundation, which has called for Telegram to improve its privacy practices. Russian President Vladimir Putin launched Russia's invasion of Ukraine in the early-morning hours of February 24, targeting several key cities with military strikes. In addition, Telegram's architecture limits the ability to slow the spread of false information: the lack of a central public feed, and the fact that comments are easily disabled in channels, reduce the space for public pushback. Russians and Ukrainians are both prolific users of Telegram. They rely on the app for channels that act as newsfeeds, group chats (both public and private), and one-to-one communication. Since the Russian invasion of Ukraine, Telegram has remained an important lifeline for both Russians and Ukrainians, as a way of staying aware of the latest news and keeping in touch with loved ones.
from cn