✅ نامهای متغیر یک متغیر میتواند یک نام کوتاه (مانند x و y) یا یک نام توصیفیتر (سن، نام کار، کلحجم) داشته باشد.
🔣 قوانین برای متغیرهای پایتون: 🟡نام متغیر باید با یک حرف یا کاراکتر زیرخط شروع شود 🟡نام متغیر نمیتواند با یک عدد شروع شود نام متغیر فقط میتواند شامل نویسههای عددی و زیرخط باشد (A-z، 0-9 و _ ) 🟡نام متغیرها به حروف بزرگ و کوچک حساس هستند (age، Age و AGE سه متغیر متفاوت هستند) 🟡نام متغیر نمیتواند هیچ یک از کلمات کلیدی پایتون باشد.
‼️ به یاد داشته باشید که نام متغیرها به حروف بزرگ و کوچک حساس هستند
📌 نامهای متغیر چند کلمهای نامهای متغیر با بیش از یک کلمه ممکن است به سختی خوانده شوند. چندین تکنیک وجود دارد که میتوانید برای خوانایی بیشتر آنها استفاده کنید:
1️⃣ مورد شتر (Camel Case) هر کلمه، به جز کلمه اول، با یک حرف بزرگ شروع میشود: myVariableName = "John"
2️⃣ کیس پاسکال (Pascal Case) هر کلمه با یک حرف بزرگ شروع می شود: MyVariableName = "John"
3️⃣ کیس مار (Snake Case) هر کلمه با یک کاراکتر زیر خط جدا شده است: my_variable_name = "John"
✅ نامهای متغیر یک متغیر میتواند یک نام کوتاه (مانند x و y) یا یک نام توصیفیتر (سن، نام کار، کلحجم) داشته باشد.
🔣 قوانین برای متغیرهای پایتون: 🟡نام متغیر باید با یک حرف یا کاراکتر زیرخط شروع شود 🟡نام متغیر نمیتواند با یک عدد شروع شود نام متغیر فقط میتواند شامل نویسههای عددی و زیرخط باشد (A-z، 0-9 و _ ) 🟡نام متغیرها به حروف بزرگ و کوچک حساس هستند (age، Age و AGE سه متغیر متفاوت هستند) 🟡نام متغیر نمیتواند هیچ یک از کلمات کلیدی پایتون باشد.
‼️ به یاد داشته باشید که نام متغیرها به حروف بزرگ و کوچک حساس هستند
📌 نامهای متغیر چند کلمهای نامهای متغیر با بیش از یک کلمه ممکن است به سختی خوانده شوند. چندین تکنیک وجود دارد که میتوانید برای خوانایی بیشتر آنها استفاده کنید:
1️⃣ مورد شتر (Camel Case) هر کلمه، به جز کلمه اول، با یک حرف بزرگ شروع میشود: myVariableName = "John"
2️⃣ کیس پاسکال (Pascal Case) هر کلمه با یک حرف بزرگ شروع می شود: MyVariableName = "John"
3️⃣ کیس مار (Snake Case) هر کلمه با یک کاراکتر زیر خط جدا شده است: my_variable_name = "John"
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. DFR Lab sent the image through Microsoft Azure's Face Verification program and found that it was "highly unlikely" that the person in the second photo was the same as the first woman. The fact-checker Logically AI also found the claim to be false. The woman, Olena Kurilo, was also captured in a video after the airstrike and shown to have the injuries. Right now the digital security needs of Russians and Ukrainians are very different, and they lead to very different caveats about how to mitigate the risks associated with using Telegram. For Ukrainians in Ukraine, whose physical safety is at risk because they are in a war zone, digital security is probably not their highest priority. They may value access to news and communication with their loved ones over making sure that all of their communications are encrypted in such a manner that they are indecipherable to Telegram, its employees, or governments with court orders. Asked about its stance on disinformation, Telegram spokesperson Remi Vaughn told AFP: "As noted by our CEO, the sheer volume of information being shared on channels makes it extremely difficult to verify, so it's important that users double-check what they read." He floated the idea of restricting the use of Telegram in Ukraine and Russia, a suggestion that was met with fierce opposition from users. Shortly after, Durov backed off the idea.
from hk