tot_price → snake_case
totPrice → camelCase
TotPrice → PascalCase

Important

snake_case is mostly used in Python for variable names.

file: 12_style-guide.py

tot_price = 100
full_name = "xnocode"

Note

  • Variable names should not contain spaces → ❌ full name
  • Use _ instead → ✔ full_name
  • Follow snake_case for better readability (recommended in Python)

You can also check out the Google Python style guide if you want to learn more: # Google Python Style Guide

<< Python Comments | Python Operators >>