1. Home
  2. >
  3. Hello world
7

Hello world
Vani Desai Vani Desai

for loop runs 5 times and hence calls the function say_hello() five times. Thus printing “Hello, World” 5 times.

# python
def say_hello():
    print ('Hello, World')

for i in range(5):
    say_hello()

Discussions

# python