Register • FAQ • Memberlist • Usergroups • Tutorials Point • Log in

| Page 1 of 1

Is that an error in Python tutorial?
Author | Message
--- | ---
Paniov Joined: 14 May 2011 Posts: 1 | Is that an error in Python tutorial? Hi, I like it your Python tutorial! Thanks, it is really good. But I think you did mistake on this page http://www.tutorialspoint.com/python/python_loop_control.htm. Check example of The continue Statement, I guess this part of code should be like this:

###### Code:

var = 10 # Second Example
while var > 0:
var = var - 1
if var == 5:
continue
print 'Current variable value :', var;
And of course it will affect the result of it, where number 5 will not be printed.
Am I correct? ))
Sat May 14, 2011 2:25 am |
tutorialspoint Site Admin Joined: 27 Apr 2007 Posts: 134 | Thanks Paniov, I have fixed it.
Tue May 17, 2011 3:16 am |
LouieInSeattle Joined: 09 Aug 2011 Posts: 1 | Missing argument in example on page http://www.tutorialspoint.com/python/string_maketrans.htm the str.translate example only has one argument: trantab. It should have two: the line it is working on, and trantab e.g. str.translate(line,trantab)
Tue Aug 09, 2011 6:06 am |
tutorialspoint Site Admin Joined: 27 Apr 2007 Posts: 134 | Pls try given example and I'm sure it will work. !/usr/bin/python from string import maketrans # Required to call maketrans function. intab = "aeiou" outtab = "12345"
trantab = maketrans(intab, outtab)
str = "this is string example....wow!!!";
print str.translate(trantab);
Wed Aug 10, 2011 4:28 am |

Display posts from previous: |

| Page 1 of 1

You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum

Powered by phpBB © phpBB Group Design by Vjacheslav Trushkin for phpBBStyles.com