+ 1

return or print?

can anybody explain the difference between print and return ? and where we should use each of them?

1st Nov 2020, 2:37 PM
shahrbanoogolmohamadi
3 Answers
+ 2
when you want to stop your function return
1st Nov 2020, 4:11 PM
💡Arno Gevorgyan 🐍
💡Arno Gevorgyan 🐍 - avatar
0
Cool codes is return: def x_bigger_than_y(x, y): return True if x > y else False x_bigger_than_y(3, 2) #Outputs True
2nd Nov 2020, 10:22 PM
JFMINEBOY JoĂŁo Felipe
JFMINEBOY JoĂŁo Felipe - avatar