Skip to content
← Python for AI/ML · all 50 levels

+= shortcuts

Level 9 of 50 · Basics

Level 9 of 50

+= shortcuts

explained with mobile balance. Watch the reel, then work through it below: run the code, take the quiz, keep the cheat sheet.

📒 Open the cheat sheet
SanaI just loaded 50 rupees on my phone!
TeacherSo balance becomes balance + 50. There's a shortcut for that!
balance.py
balance = 100
balance = balance + 50
print(balance)
TeacherThe long way. Take balance, add 50, store it back.
balance.py
balance = 100
balance += 50
print(balance)
TeacherThe shortcut! +=. Same answer, less typing!
SanaDoes it work for minus too?
TeacherYes! -=, *=, all of them. Do the maths, then store!

⏸ Pause & predict: what prints?

balance = 100
balance + 50
print(balance)

Where this leads

Python is step one. Building AI that ships is the rest.

The diploma takes you from zero to deployed computer vision, LLM and agent projects, with engineers who build them for a living. Already code? The bootcamp does it in three months.