Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Python Fundamentals

Lesson 4 of 55 · Python

Variables and Data Types

Duration: 20 minutes

Variables and Data Types\n\nPython uses dynamic typing, which means you don’t need to declare a variable’s type upfront – the interpreter infers it from the assigned value. Common built‑in types include integers, floats, strings, booleans, and the special None value.\n\npython\nage = 30 # int\nprice = 19.99 # float\nname = 'Alice' # str\nis_active = True # bool\nnothing = None # NoneType\n\nprint(type(age), type(price), type(name), type(is_active), type(nothing))\n\n\n### Naming Conventions\n- Use snake_case for variable and function names (user_name).\n- Avoid Python keywords (class, def, if).\n- Constants are typically written in UPPER_SNAKE_CASE.\n\nWith variables under your belt, you can start storing and manipulating data.\n

Previous: Setting Up the Development EnvironmentNext: Basic Operators