TGViewer
Channel Public Channel
Learn Python Coding

Learn Python Coding

@pythonre

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
Subscribers
40.8K
Photos
709
Videos
37
Links
517

Showing posts older than #8927 · Back to latest

Older Posts 20 shown
Post #8926 1.43K
✨ Quiz: Recursion in Python: An Introduction ✨

📖 Test your understanding of recursion in Python, including base cases, recursive structure, performance considerations, and common use cases.

🏷️ #intermediate #algorithms #python
  • ❤ 1
Post #8925 1.44K
✨ flit | Python Tools ✨

📖 A build and publish tool that packages pure Python.

🏷️ #Python
Post #8924 1.53K
✨ Vim | Code Editors & IDEs ✨

📖 A free, open-source, highly configurable text editor.

🏷️ #Python
Post #8923 1.5K
✨ ipaddress | Python Standard Library ✨

📖 Provides the capabilities to create, manipulate, and operate on IPv4 and IPv6 addresses.

🏷️ #Python
Post #8920 2.88K
Advice on clean code in Python

Don't use "naive" datetime without time zones. Store and process time in UTC, and display it to the user in his local time zone

import datetime
from zoneinfo import ZoneInfo

# BAD
now = datetime.datetime.now()

print(now.isoformat())
# 2025-10-21T15:03:07.332217

# GOOD
now = datetime.datetime.now(tz=ZoneInfo("UTC"))
print(now.isoformat())
# 2025-10-21T12:04:22.573590+00:00

print(now.astimezone().isoformat())
# 2025-10-21T15:04:22.573590+03:00
  • ❤ 2
Post #8919 1.48K
Create a simple weather parser that displays the current temperature and weather conditions from a free API

We will write a script that retrieves weather data for your city and displays it in a convenient format.

First, we need the requests library for network operations. If it's not installed, install it via the terminal with the command:
pip install requests


Import the module and define a function that retrieves data from the Open-Meteo API (no key required) for specific coordinates:
import requests

def get_weather(lat, lon):
    url = f"https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&current_weather=true"
    return requests.get(url).json()['current_weather']


Specify the coordinates of your city (for example, Moscow):
moscow_coords = (55.75, 37.62)

Display the temperature and wind speed:
weather = get_weather(*moscow_coords)
print(f"Temperature: {weather['temperature']}°C, Wind speed: {weather['windspeed']} km/h")


🔥 Get fresh weather data without registration or passwords — useful for your own projects or bots!

🚪 @DataScience4
  • ❤ 3
Post #8918 1.28K
✨ Topic: Python Machine Learning ✨

📖 Learn how to implement machine learning (ML) algorithms in Python. With these skills, you can create intelligent systems capable of learning and making decisions.

🏷️ #35_resources
  • ❤ 2
  • 👎 1
Post #8917 1.32K
✨ Quiz: SOLID Design Principles: Improve Object-Oriented Code in Python ✨

📖 Learn Liskov substitution in Python. Spot Square and Rectangle pitfalls and design safer APIs with polymorphism. Test your understanding now.

🏷️ #intermediate #best-practices #python
  • ❤ 2
Post #8916 1.38K
✨ Spyder | Code Editors & IDEs ✨

📖 A free, open source integrated development environment (IDE) for Python that is tailored to scientific computing and data analysis.

🏷️ #Python
Post #8915 1.5K
✨ Emacs | Code Editors & IDEs ✨

📖 A free, open-source, highly extensible text editor and computing environment.

🏷️ #Python
  • ❤ 1
Post #8914 1.58K
✨ Coverage.py | Python Tools ✨

📖 A tool that measures test coverage for Python.

🏷️ #Python
  • ❤ 1
Post #8913 1.83K
✨ Jupyter Notebook | Code Editors & IDEs ✨

📖 A web-based interactive computing environment that lets you combine executable code and narrative text.

🏷️ #Python
  • ❤ 4
Post #8912 1.71K
✨ Cookiecutter | Python Tools ✨

📖 A project templating and scaffolding tool.

🏷️ #Python
  • ❤ 1
Post #8911 1.59K
✨ JupyterLab | Code Editors & IDEs ✨

📖 A web-based interactive development environment (IDE) for Jupyter notebooks.

🏷️ #Python
  • ❤ 2
Post #8909 1.7K
✨ Notepad++ | Code Editors & IDEs ✨

📖 A free, open-source text and source code editor for Windows.

🏷️ #Python
  • ❤ 4
Post #8908 1.65K
✨ Thonny | Code Editors & IDEs ✨

📖 A free, open-source integrated development environment (IDE) for Python that focuses on simplicity.

🏷️ #Python
  • ❤ 2
Post #8907 1.56K
✨ Bandit | Python Tools ✨

📖 A static analysis tool that scans Python code to detect common security issues.

🏷️ #Python
  • ❤ 1
Post #8906 7.99K
Automatic translator in Python!

We translate a text in a few lines using deep-translator. It supports dozens of languages: from English and Russian to Japanese and Arabic.

Install the library:
pip install deep-translator


Example of use:
from deep_translator import GoogleTranslator

text = "Hello, how are you?"
result = GoogleTranslator(source="ru", target="en").translate(text)

print("Original:", text)
print("Translation:", result)


Mass translation of a list:
texts = ["Hello", "What's your name?", "See you later"]
for t in texts:
    print("→", GoogleTranslator(source="ru", target="es").translate(t))


🔥 We get a mini-Google Translate right in Python: you can embed it in a chatbot, use it in notes, or automate work with the API.

🚪 @DataScience4
  • ❤ 5
Post #8905 1.46K
✨ How to Build a Personal Python Learning Roadmap ✨

📖 Learn how to create a personalized Python learning roadmap. Set goals, choose resources, and build a plan to track your progress and stay motivated.

🏷️ #basics #best-practices
  • ❤ 3
Post #8904 1.4K
✨ Reference: Code Editors & IDEs ✨

📖 Popular code editors and IDEs that help you write, run, and debug Python code.

🏷️ #2_terms
  • ❤ 2
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →