Skip to main content
added 138 characters in body
Source Link
Peilonrayz
  • 43.5k
  • 7
  • 76
  • 155

You can simplify mfoo = mfoo + 1... can beto just mfoo += 1....

andFor example you can simplify the following two lines:

total = total + tenttotal + ref[roman[m]] - negtotal can be total += tenttotal + ref[roman[m]] - negtotal

m = m + 1
m += 1
total = total + tenttotal + ref[roman[m]] - negtotal
total += tenttotal + ref[roman[m]] - negtotal

m = m + 1 can be m += 1

and

total = total + tenttotal + ref[roman[m]] - negtotal can be total += tenttotal + ref[roman[m]] - negtotal

You can simplify foo = foo + ... to just foo += ....

For example you can simplify the following two lines:

m = m + 1
m += 1
total = total + tenttotal + ref[roman[m]] - negtotal
total += tenttotal + ref[roman[m]] - negtotal
deleted 91 characters in body
Source Link

@TheCount Do you know about the shorthand "+" in general programming and python? E.g.,

m = m + 1 can be m += 1

and

total = total + tenttotal + ref[roman[m]] - negtotal can be total += tenttotal + ref[roman[m]] - negtotal

@TheCount Do you know about the shorthand "+" in general programming and python? E.g.,

m = m + 1 can be m += 1

and

total = total + tenttotal + ref[roman[m]] - negtotal can be total += tenttotal + ref[roman[m]] - negtotal

m = m + 1 can be m += 1

and

total = total + tenttotal + ref[roman[m]] - negtotal can be total += tenttotal + ref[roman[m]] - negtotal

Source Link

@TheCount Do you know about the shorthand "+" in general programming and python? E.g.,

m = m + 1 can be m += 1

and

total = total + tenttotal + ref[roman[m]] - negtotal can be total += tenttotal + ref[roman[m]] - negtotal