+ 1

Why is there a "." before join? And why is it 24 eventually?

What is the output of the code? def f(r): j = range (1, r + 1) return eval("*".joint([str(i) for i in j])) print(f(4))

23rd Jan 2020, 6:13 AM
Shamil Erkenov
Shamil Erkenov - avatar
2 ответов
+ 1
joint???? 1*2*3*4 = 24
23rd Jan 2020, 6:25 AM
Mihai Apostol
Mihai Apostol - avatar
+ 1
sorry "join"
23rd Jan 2020, 6:30 AM
Shamil Erkenov
Shamil Erkenov - avatar