Q:

Using the same 3 lines of code to print many lines

The code below prints the text welcome, letter by letter every 0.1 seconds. 
welcome = ("Welcome")

for character in welcome:
    print (character, end = "", flush = True)
    sleep(0.1)

Usually if I wanted to print several things (in this case Welcome and Hello) I would do this:
welcome = ("Welcome")
hello = ("Hello")

for character in welcome:
    print (character, end = "", flush = True)
    sleep(0.1)

for character in hello:
    print (character, end = "", flush = True)
    sleep(0.1)

But it is not efficient to be typing this every time I want a new line because it wastes a lot of time and space.
for character in hello:
        print (character, end = "", flush = True)
        sleep(0.1)

Is there a way I can somehow use only one of these
for character in hello:
            print (character, end = "", flush = True)
            sleep(0.1)

to print many different lines like this:
hello = ("How are You")
welcome = ("Welcome")
nice = ("Awesome")

A:

You could iterate over an array, in which you store all messages:
from time import sleep

hello = ("How are You")
welcome = ("Welcome")
nice = ("Awesome")

messages = [hello, welcome, nice]
for message in messages:
    for character in message:
        print (character, end = "", flush = True)
        sleep(0.1)
    print('')

the output looks like that:

How are You
Welcome
Awesome

