FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

problem3




A simple python program that accepts a string and displays it as shown in sample below:


Enter a string: nestor
n
ee
sss
tttt
ooooo
rrrrrr



1 blog comments below

answer:


s = raw_input('Enter a string:')
for i in range(len(s)):
print s[i]*(i+1)
nfbueno78 on Sat Feb 11, 2012 6:31 pm



FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.