Support Forums
Is there a fuction that make x equal to the amount of letters in hello? - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32)
+---- Thread: Is there a fuction that make x equal to the amount of letters in hello? (/showthread.php?tid=1217)



Is there a fuction that make x equal to the amount of letters in hello? - nevets04 - 10-11-2009

Is there a fuction that make x equal to the amount of letters in hello?


RE: Is there a fuction that make x equal to the amount of letters in hello? - g4143 - 10-11-2009

(10-11-2009, 12:04 PM)nevets04 Wrote: Is there a fuction that make x equal to the amount of letters in hello?

Do you mean something like x = len('hello')


RE: Is there a fuction that make x equal to the amount of letters in hello? - Socrates - 10-11-2009

yea it's would be done like this.

Quote: x = raw_input ("Enter your word or string")

print len(x)

Tongue