Different output using print and return : can anyone explain me why we get different output using print and return.

For this code: 

    def string(txt):
        for char in txt:
            print(char)

    string('Stack')

 the output would be:

    S
    t
    a
    c
    k

And for this code:

    def string1(txt):
        for char in txt:
            return char
    
    string1('Stack')

the output would be:

    'S'

