Ask coding questions

← Back to all posts
1
beginner using the script
TonySiu (0)

how do i run arithmetics in the shell on python?

Commentshotnewtop
1
PaoloAmoroso (62)

I'm not sure I understand your question but you may try this:

x = 5; x = x * 5

Or:

x = 5
x = x * 5

The above is equivalent to this:

x = 5
x *= 5