Learn Python Coding
Learn Python through simple, practical examples and real coding ideas. Clear explanations, useful snippets, and hands-on learning for anyone starting or improving their programming skills. Admin: @HusseinSheikho || @Hussein_Sheikho
Ko'proq ko'rsatish📈 Telegram kanali Learn Python Coding analitikasi
Learn Python Coding (@pythonre) Ingliz til segmentidagi kanali faol ishtirokchi. Hozirda hamjamiyat 40 057 obunachidan iborat bo'lib, Texnologiyalar & Aralashmalar toifasida 3 241-o'rinni va Hindiston mintaqasida 9 624-o'rinni egallagan.
📊 Auditoriya ko‘rsatkichlari va dinamika
невідомо sanasidan buyon loyiha tez o‘sib, 40 057 obunachiga ega bo‘ldi.
28 Avgust, 2026 dagi oxirgi ma’lumotlarga ko‘ra kanal barqaror faollikka ega. Oxirgi 30 kunda obunachilar soni 145 ga, so‘nggi 24 soatda esa 8 ga o‘zgardi va umumiy qamrov yuqori darajada qolmoqda.
- Tasdiqlash holati: Tasdiqlanmagan
- Jalb etish (ER): Auditoriya o‘rtacha 3.02% darajada jalb etiladi. Nashrdan keyingi dastlabki 24 soatda kontent odatda umumiy obunachilar sonining 1.11% ini tashkil etuvchi reaksiyalarni to‘playdi.
- Post qamrovi: Har bir post o‘rtacha 1 211 marta ko‘riladi; birinchi sutkada odatda 444 ta ko‘rish yig‘iladi.
- Reaksiyalar va o‘zaro ta’sir: Auditoriya faol: har bir postga o‘rtacha 2 ta reaksiya keladi.
- Tematik yo‘nalishlar: Kontent math, harvard, oxford, supervision, waybienad kabi asosiy mavzularga jamlangan.
📝 Tavsif va kontent siyosati
Muallif resursni shaxsiy fikrni ifoda etish maydoni sifatida ta’riflaydi:
“Learn Python through simple, practical examples and real coding ideas. Clear explanations, useful snippets, and hands-on learning for anyone starting or improving their programming skills.
Admin: @HusseinSheikho || @Hussein_Sheikho”
Yuqori yangilanish chastotasi (oxirgi ma’lumot 29 Avgust, 2026 da olingan) sababli kanal doimo dolzarb va katta qamrovli bo‘lib qoladi. Analitika auditoriya kontent bilan faol hamkorlik qilishini, uni Texnologiyalar & Aralashmalar toifasidagi muhim ta’sir nuqtasiga aylantirishini ko‘rsatadi.
20 to the variable x and 30 to the variable y, and then swap them: x becomes 30, and y becomes 20. This method is called tuple packing/unpacking.
x, y = 20, 30
x, y = y, x
print('x is: ', x)
print('y is: ', y)
x is 30
y is 20
You can also use the XOR (exclusive or) operator to swap variables. This is a three-step method. In the example below, we swap the values of x and y.
x = 20
y = 30
# step one
x ^= y
# step two
y ^= x
# step three
x ^= y
print(f'x is: {x}')
print(f'y is: {y}')
x is: 30
y is: 20
You can also use arithmetic operations (addition and subtraction) to swap variables without a temporary variable. However, this method is recommended for swapping numeric data types. Here's an example:
# Use arithmetic operations
x = 5
y = 10
x = x + y
y = x - y
x = x - y
print("After swapping:")
print("x =", x)
print("y =", y)
After swapping:
x = 10
y = 5
As a result of these arithmetic operations, the values of x and y have actually been swapped. After the swap, x contains the original value of y (10), and y contains the original value of x (5).
This method of swapping variables without a temporary variable is based on the fact that when you add or subtract the value of one variable from another, you can effectively swap their values without the need for additional storage.
👉 https://t.me/DataScience4datetime module. The now() method returns a datetime object representing the current date and time according to the system clock. The strftime() method formats the time for the desired output. This code shows how to use the datetime module together with the strftime() method to get a formatted time string in the format of hours, minutes, and seconds.
from datetime import datetime
time_now = datetime.now().strftime('%H:%M:%S')
print(f'Current time: {time_now}')
Current time: 17:37:28
What if we want to return today's date? We can use date from the datetime module. Below, the today() method is used:
from datetime import date
today_date = date.today()
print(today_date)
2023-09-20
👉 https://t.me/DataScience4calendar. We can import this module to display the calendar. There are many things you can do with the calendar.
Let's say we want to see the calendar for April 2022. We use the month class from the calendar module and pass the year and month as arguments. See below:
import calendar
month = calendar.month(2022, 4)
print(month)
There are many other things you can do with calendar. For example, you can use it to check whether a given year is a leap year or not. Let's check if 2022 is a leap year.
import calendar
month = calendar.isleap(2022)
print(month)
False
👉 https://t.me/DataScience4|) or the operator (**). Below we have two dictionaries: first_dict and second_dict. We will use these two methods to merge the dictionaries. Here's the code:
1️⃣ Using the merge operator (|)
first_dict = {"kelly": 23,
"Derick": 14, "John": 7}
second_dict = {"Ravi": 45, "Mpho": 67}
combined_dict = first_dict | second_dict
print(combined_dict)
Output:
{'kelly': 23, 'Derick': 14, 'John': 7, 'Ravi': 45, 'Mpho': 67}
2️⃣ Method 2: using the merge operator (**)
With this operator, you need to put the dictionaries inside curly braces. In the code below, we "substitute" two dictionaries for merging using two operators *. Both dictionaries are enclosed in curly braces and separated by a comma.
first_dict = {"kelly": 23,
"Derick": 14, "John": 7}
second_dict = {"Ravi": 45, "Mpho": 67}
combined_dict = {**first_dict, **second_dict}
print(combined_dict)
Output:
{'kelly': 23, 'Derick': 14, 'John': 7, 'Ravi': 45, 'Mpho': 67>
👉 https://t.me/DataScience4