Python: Creating a table, what does "none" mean? -
trying build basic multiplication table, , keep getting these "none"s. mean , how can rid of them?
>>> def m(n): ... = 1 ... while <= 6: ... print i*n, '\t', ... = +1 ... print >>> def printt(): ... w = 1 ... while w <= 6: ... print m(w) ... w = w + 1 ... >>> printt() 1 2 3 4 5 6 none 2 4 6 8 10 12 none 3 6 9 12 15 18 none 4 8 12 16 20 24 none 5 10 15 20 25 30 none 6 12 18 24 30 36 none
replace print m(w)
m(w)
. printing return value of m(w)
none
since not returning function.
Comments
Post a Comment