Smart Tech
Wednesday, June 10, 2015
Length of a string with out len() function - Python
st = " This is awesome!"
count = 0
for x in st:
count = count + 1
print count
if(len(st) == count):
print "it works!"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment