0

Sorry for a question that might sound dumb, but in Python, is there a way to easily add 1 to a variable value, rather than doing

   var_one = 1
   var_one = var_one + 1

all the time?

1 Answers1

1

Try this one on for size:

var_one += 1
saarrrr
  • 2,754
  • 1
  • 16
  • 26