Python: Simple for loop

#!/usr/bin/python
import sys
c = "I am a best player"
a = range(1,11)
print a

for b in a:
        print  c


OUTPUT:
[root@mysql Scripts]# python For.py
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
I am a best player
I am a best player
I am a best player
I am a best player
I am a best player
I am a best player
I am a best player
I am a best player
I am a best player
I am a best player
 

Comments

Popular posts from this blog

How to delete SEA in VIOS

More VIOS commands

Webmin configuration for LDAP