return it
This seems like a perfect example for using a class instead of functions
return name in get_name() and then in main(): name = get_name()
Yes I have tried it
def get_name(): return input("Enter your name: ") def main(): return get_name() print(main())
i see... so far i have yet to learn class... i'm revising function chapter now
Обсуждают сегодня