Python Basics: Print Function and Indentation

🐍 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

  • graphical user interface

To view or add a comment, sign in

Explore content categories