week3

+=

+= adds another value with the variable's value and assigns the new value to the variable.

>>> x = 3
>>> x += 2
>>> print x
5

-=, *=, /= does similar for subtraction, multiplication and division.

.format

>>>print “{0},{1},{0}”.format(0=9, 1=8)

989

try:

try:

do_a_dumb()

except Exception as e:

print(“You did a dumb”, e)

finally:

print(“we still love you”)


stuck on gene krupa range…

finalllly this is generating a 2-step number list but steps were 5 and 2???!!!still not rite…

Later the result came out with one exceeds the stop… to fix this by append number_list_4 first before loop starts.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.