I tested the following code:
In [266]: def foo():
...: print("yes")
...:
In [267]: def bar():
...: return foo()
...:
In [268]: bar()
yes
In [269]: x = bar()
yes
I am very puzzled about the result, it act as
In [274]: def foo():
...: return print("yes %.1f" %12.333)
...:
...:
In [275]: foo()
yes 12.3
How should I understand this? much like shell script shell's command substitution echo $(ls)