You have to explicitly use the return
keyword. Probably where you currently have print c
.
f
needs to return ba
after the while loop.
More Related Contents:
- Why does my recursive function return None?
- How is returning the output of a function different from printing it?
- Why does “return list.sort()” return None, not the list?
- What is the purpose of the return statement? How is it different from printing?
- Best way to return multiple values from a function? [closed]
- return, return None, and no return at all?
- How can I return two values from a function in Python?
- Recursive code returns None [duplicate]
- Return in Recursive Function
- How to use a return statement in a for loop?
- What’s the best way to return multiple values from a function? [duplicate]
- Difference between returns and printing in python? [duplicate]
- How can I use `return` to get back multiple values from a for loop? Can I put them in a list?
- How do I pass variables across functions?
- return eats exception
- In Python, if I return inside a “with” block, will the file still close?
- Alternatives for returning multiple values from a Python function [closed]
- How do I get a result (output) from a function? How can I use the result later?
- How can I use `return` to get back multiple values from a loop? Can I put them in a list?
- Is it possible to not return anything from a function in python?
- How does Python return multiple values from a function?
- What does return mean in Python? [closed]
- Accessing returned values from a function, by another function
- Where to use the return statement with a loop?
- How do I get the return value when using Python exec on the code object of a function?
- store return value of a Python script in a bash script
- Best way to return a value from a python script
- Python – returning from a Tkinter callback
- How can I call a function within a class?
- Changing the directory where .pyc files are created