#pythontips — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #pythontips, aggregated by home.social.
-
Don't get me wrong, the learning curve is real!
However Python devs have a head start — you already think in types, you already care about elegance + clean code.
Which tip would've helped you most? Or any other ones?
-
Happy 32nd anniversary, Python! Learn 32 practical Python one-liners that show why readability, simplicity, and power still define the language today.
More details here: https://ostechnix.com/32-python-one-liners/
#Python #Oneliners #Anniversary #Programming #Opensource #PythonTips
-
🐍💡 ¿Sabías que en Python __init__ no es el constructor?
En Python solemos llamar “constructor” a __init__, pero técnicamente no lo es.
El verdadero constructor es __new__, el método que crea la nueva instancia de la clase.
Recién después de que __new__ devuelve el objeto, Python llama a __init__ para inicializar sus atributos.¿Querés saber más? 👇
https://juncotic.com/poo-metodos-especiales-en-python/
#Python #Programación #DesarrolloSoftware #POO #CleanCode #AprenderPython #PythonTips
-
🔍 ¿Conocés los MÉTODOS ESPECIALES en Python?
Los métodos con doble guión bajo (init, str, len, etc.) son una de las características más poderosas de Python, pero pocos los dominan realmente.
En este nuevo artículo te explico:
✅ ¿Qué son realmente los métodos especiales?
✅ Los métodos más útiles en proyectos reales
✅ Cómo implementar operadores personalizados (+, -, ==, etc.)https://juncotic.com/poo-metodos-especiales-en-python/
#Python #POO #Programación #DesarrolloSoftware #PythonTips #python
-
First Programme in Python for starting Programming Journey - S1 EP01 P2 #python #PythonProgramming #LearnPython #CodingForBeginners #PythonBasics #ProgrammingSeries #TechEducation #CodeTutorial #Developers #CodingJourney #ProgrammerLife #PythonTips #SoftwareDevelopment #CodingCommunity #EducationalContent
-
Introduction to Python Programming Language - S1 EP01 P1 #Python #PythonProgramming #LearnPython #CodingForBeginners #PythonBasics #ProgrammingSeries #TechEducation #CodeTutorial #Developers #CodingJourney #ProgrammerLife #PythonTips #SoftwareDevelopment #CodingCommunity #EducationalContent
-
Learn to write cleaner Python code with these 10 practical techniques: use dataclasses instead of dicts, implement enums for fixed choices, leverage pathlib over os.path, write pure functions, add proper docstrings, and handle exceptions specifically. Transform from "it works" to truly maintainable code. #Python #CleanCode #Programming #SoftwareDevelopment #CodingTips #PythonTips #Developer https://www.kdnuggets.com/stop-writing-messy-python-a-clean-code-crash-course
-
🚀 #PythonForBeginners #LearnToCode #TechSkills #AI #DataScience #CodingLife #100DaysOfCode #PythonTips #YouTubeLearning #DebasisPaul #PythonJourney
💬 Drop a comment if you're learning Python or want help getting started. Let's build something amazing together.
-
A Leanpub Frontmatter Podcast Interview with Alex Telford, Author of Practical Python for Production Under Pressure: Managing the insanity that is developing pipelines alongside a production at full speed | Watch here: https://youtu.be/uDziREzkpdY #books #Python #VFX #SoftwareEngineering #PythonTips
-
Leanpub book LAUNCH 🚀 Practical Python for Production Under Pressure: Managing the insanity that is developing pipelines alongside a production at full speed by Alex Telford https://youtu.be/nPvgqZZWJ5Y #books #booklaunch #Python #VFX #SoftwareEngineering #PythonTips
-
Tuple instead of Lists in Python:
Use a tuple instead of a list in Python when you need an immutable, hash able, and faster collection of fixed items.
#PythonTips #PythonTuple #LearnPython #PythonDev #CodingTips #Immutable #PythonCode #DevLife #TupleVsLis -
Named Tuples in Python:
A named tuple lets you create lightweight, immutable objects with named fields for better readability and access than regular tuples.
#Python #PythonTips #NamedTuple #CodingTips #LearnPython #PythonDeveloper #CodeSmarter #100DaysOfCode #PythonHack #TechTip -
Swap variable using tuple :
This is a Pythonic and efficient way to swap values without using a temporary variable. a, b = b, a
#PythonTips #OneLinerPython #PythonTricks #CleanCode #LearnPython #CodeSnippet #100DaysOfCode #DevLife #Pythonista #codingmadeeasy -
Single Element Tuple in Python:
A single element tuple in Python is defined by placing a comma after the element, e.g., t = (5,).
#Python #Tuple #PythonTips #LearnPython #Coding #PythonBasics #DevTips #SingleElementTuple #PythonProgramming #codenewbie -
Slicing Tuple in python:
Slicing a tuple in Python means extracting a portion of it using the syntax tuple[start :stop :step].
#Python #PythonTips #Tuple #PythonSlicing #CodeSnippet #LearnPython #DevTips #100DaysOfCode #Programming #pythonlearning -
Comprehension to create dictionaries in Python:
Dictionary comprehension is a concise way to create dictionaries in a single line using a syntax similar to list comprehension.
#Python #PythonTips #DictionaryComprehension #CodeNewbie #100DaysOfCode #LearnPython #OneLiner #PythonTricks #DevTips #CodingInPython -
Loop through dictionaries in Python:
A dictionary in Python is a collection of key-value pairs. To loop through a dictionary, you can use several methods depending on what you want to access: keys, values, or both.
#Python #PythonTips #LearnPython #Coding #PythonProgramming #100DaysOfCode #CodeNewbie #DevCommunity #ProgrammingTips #TechEducation #softwaredevelopment -
Dictionaries in Python:
Dictionaries in Python are collections of key-value pairs that allow fast data retrieval based on unique keys.
#Python #PythonTips #Dictionaries #LearnPython #Coding #PythonProgramming #CodeNewbie #100DaysOfCode #pythonbasics -
Iterate in Dictionaries in Python:
Iterating in dictionaries means looping through keys, values, or key-value pairs using a for loop.
#Python #PythonTips #CodeNewbie #100DaysOfCode #LearnPython #DevLife #Coding #PythonDictionaries #PythonLoops #womenwhocode -
Add & remove items in Dictionaries in Python
#Python #PythonTips #LearnPython #PythonProgramming #CodeNewbie #PythonDictionaries #100DaysOfCode #CodingTips #DevLife #OneLinerPython -
Nested Dictionaries in Python:
A nested dictionary in Python is a dictionary where values can also be dictionaries, allowing multi-level data storage.
#PythonTips #NestedDictionary #LearnPython #PythonForBeginners #CodeSmart #PythonDev #PythonBasics #CodingTips -
List comprehensions are more concise, readable, and often faster than traditional for loops for simple tasks.
#PythonTips #CleanCode #PythonPractice #CodeBetter #LearnPython #PythonDeveloper #CodingBestPractices #PythonTricks #DevTips #CodeSmart -
Tuple inside Dictionary in Python:
Tuples can be used as dictionary keys because they are immutable and hashable, unlike lists.
#Python #CodingTips #LearnToCode #DevLife #Programming #CodeNewbie #PythonTips #Techie #SoftwareDev #100DaysOfCode #DataScience #AI #MachineLearning #CodeSmart #developerlife -
Tuple conversion in Python:
Use list() to convert a tuple to a list, and tuple() to convert a list to a tuple.
#python #TupleToList #ListToTuple #pythontips #codingshorts #learnpython #devtips #pythonbasics -
Nested Tuples in Python:
Nested tuples in Python are tuples that contain other tuples as elements.
#python #tuples #NestedTuples #pythontips #learnpython #pythonprogramming #codenewbie #100DaysOfCode #pythondeveloper -
Tuple Repetition in Python:
Tuple repetition in Python uses the * operator to repeat elements of a tuple multiple times.
#coding #python #programminglanguage #pythoncoding #softwareengineering #Python #PythonTips #PythonTuples -
Format string Method in Python :
The format() method in Python inserts values into a string using placeholders{}. #pythoncoding #StringFormatting #formatMethod #pythontips #codingbasics -
Tuple concatenation in Python:
Tuple concatenation in Python means combining two or more tuples using the + operator.
#python #tuples #pythontips #TupleConcatenation #codesnippet #learnpython -
Tuple Membership testing:
Tuple membership testing checks if an element exists in a tuple using the ''in'' or ''not in'' operators.
#pythoncoding #tuples #pythontips #coding #learnpython #pythonprogramming #TupleMembership #codenewbie #developerlife #100daysofcode