Print function not printing anything
Hi guys I'm trying to reverse my list here using a function. I don't know why my code isn't working. See the code below: L=[1, 2,3,4] def rev() : L.reverse() print(L) #The code is running but not printing the reversed list. Please help.
you need to call the function at the end L = [1, 2, 3, 4] def rev(): L = L.reverse() print(L) rev()
Thanks much. It is working now. Have a blessed day
BMI calculator code project
Overloading + operator
How to create a border