🐍 Python in 60 Seconds — Day 3 print() outputs exactly what you give it. print("Hello") print( "Hello" ) Both lines produce the same output -> Hello Spaces inside the parentheses don’t matter. But this does 👇 print(" Hello") Output: Hello Now Python prints the spaces before the text. ⚠️ Beginner trap: If you add spaces before the print keyword itself, Python raises an error. Indentation matters in Python — but only where it’s allowed, otherwise it will throw an error Insight: In Python, spaces inside strings are content. Spaces before code are structure. Tomorrow: how Python stores text and numbers (variables). #Python #LearnPython #Programming #Coding #TechCareers #DataScience #100DaysOfCode
Python Basics: Print Function and Indentation
More Relevant Posts
-
🚀 Feature Engineering Made Smarter with Python! 🧠🐍 Just read an excellent article on KDnuggets that every machine learning practitioner should check out! It shares 5 highly practical Python scripts that automate core feature engineering tasks and help you build better models faster. ✨ 🔹 What’s covered: ✔️ Smart encoding of categorical features ✔ Automatic transformations for numerical data ✔ Systematic generation of feature interactions ✔ Rich datetime feature extraction ✔ Automated feature selection to reduce noise and improve performance Whether you’re battling high-cardinality categories or trying to uncover powerful feature interactions — these scripts help streamline the process and save tons of manual effort. 💡 📈 If you’re working on machine learning models in Python, this is a must-read! Check it out and let me know which script you’ll try first! 👇 Source: KDnuggets https://search.app/wChSs #MachineLearning #Python #FeatureEngineering #DataScience #KDnuggets
To view or add a comment, sign in
-
Python Strings – the basics you can’t skip 🐍 Strings in Python are used to store text and are one of the most commonly used data types. Example: text = "Hello Python" 📌 Key things to remember: Strings are immutable (cannot be changed after creation) Can be written using single, double, or triple quotes Support powerful built-in methods like: upper(), lower() replace() split(), strip() Indexing & slicing make text handling super easy Mastering strings = mastering data handling in Python 💡 #Python #PythonBasics #Programming #LearningToCode #DataAnalytics
To view or add a comment, sign in
-
🐍 90 Days of Python – Day 9 Today, I learned about loops in Python, which help in executing a block of code repeatedly. Loops are useful when we need to perform the same task multiple times without writing duplicate code. Key concepts I explored today: • for loops – used to iterate over sequences like lists, strings, or ranges • while loops – used when a condition needs to be checked repeatedly • Understanding loop conditions and termination • Using loops to automate repetitive tasks Loops play a major role in writing efficient and scalable programs. I’m practicing these concepts to better understand how Python handles repetition and flow control. 📌 Day 9 completed. Automating repetition with loops. 👉 Can you share a simple example where loops saved you time? #90DaysOfPython #PythonLearning #LearningInPublic #ProgrammingBasics #BTechCSE #MachineLearning
To view or add a comment, sign in
-
-
🚀 Ever wondered how Python finds your variables? Meet the LEGB Rule! Python searches for variables in this order: ✅ Local → Inside your current function ✅ Enclosing → Outer function (nested functions) ✅ Global → Defined at the top level of your script ✅ Built-in → Python’s own reserved names (like len , print ) 💡 Why NameError happens? If Python can’t find the variable in L, it checks E 》 then G 》 then B. If it’s not found anywhere → NameError! will be raised❌️ 🔥 Pro Tip: Use 'global, or 'nonlocal' to modify outer scopes or enclosing variable. 👉 Which scope do you use most? Comment below! #Python #CodingTips #LEGBRule #DevCommunity #LearnPython #Coding #Programming #Developer #Tech
To view or add a comment, sign in
-
-
Day 15 of #WhatILearnedToday 🐍 Today I learned about Python Dictionaries—one of the most powerful and commonly used data structures in Python. Dictionaries store data in key–value pairs, making data retrieval fast, flexible, and highly efficient. Understanding how to create, update, loop through, and use built-in dictionary methods really helped me see how Python handles real-world data structures. From APIs to configuration files and backend logic—dictionaries are everywhere. 💬 What’s your most-used Python data structure: list, dictionary, or set? #WhatILearnedToday #Python #PythonDictionary #Programming #PythonLearning #Upskilling #DeveloperJourney #ContinuousLearning
To view or add a comment, sign in
-
-
🎥 Python Sets and Methods Today I shared a video explaining Python sets, a powerful data structure used to store unique elements. Sets are especially useful for removing duplicates, performing mathematical operations like union and intersection, and working with unordered data. In this video, I also covered commonly used set methods with examples and problem-solving scenarios to show how they work in real coding situations. Understanding sets helps write cleaner, faster, and more efficient Python code 💻✨ #Python #Sets #Programming #Coding #ProblemSolving #LearningJourney
To view or add a comment, sign in
-
🧠 Everything You Need to Know About set in Python A set in Python is an unordered, mutable collection of unique elements. It’s one of the most powerful data structures when used correctly. 🔹 Key Characteristics of set ✔ Stores only unique values ✔ Unordered (no indexing, no slicing) ✔ Mutable (you can add/remove elements) ✔ Elements must be immutable & hashable ✔ Implemented using hash tables 🔹 When to Use set ✅ Removing duplicates ✅ Fast lookups ✅ Comparing collections ✅ Mathematical operations ✅ Interview problem optimization ❌ When NOT to Use set ❌ When order matters ❌ When duplicates are required ❌ When indexing is needed #Python #DataStructures #LearningPython #Programming #LinkedInLearning #CodeDaily
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development