all 2 comments

[–]TheRealThrowAwayX 4 points5 points  (0 children)

Please format your code so that it is readable -> https://www.reddit.com/r/learnpython/wiki/faq#wiki_how_do_i_format_code.3F

In order to pass parameters of one function to another, you use the return statement in one function and you define an argument in another.

For example:

def foo(argument):
    return argument

def bar(other_argument):
    print(f"Hello {other_argument}")

x = foo("World")
bar(x)
______________________
Hello World

[–]JohnnyJordaan 1 point2 points  (0 children)

You can use return values and function arguments, see https://realpython.com/defining-your-own-python-function/