By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,818 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,818 IT Pros & Developers. It's quick & easy.

Confusing

P: 2
Expand|Select|Wrap|Line Numbers
  1. def mySlicer (x, y, z):
  2.     result = ""
  3.     x1 = 0
  4.     if y > len(z):
  5.         y = len(z)
  6.     while y - x1 >= len(result):
  7.         if x1 < y:
  8.             result = result + z[x]  
  9.             x = x + 1
  10.             x1 = x1 + 1
  11.  
  12.         print result
What´s the problem?
Cheers
Nov 19 '08 #1
Share this Question
Share on Google+
3 Replies


Curtis Rutland
Expert 2.5K+
P: 3,256
What do you mean, where's the problem?

You shouldn't just dump code on the experts here without providing at least your output and error messages, if any.

Also, you need a more descriptive title. I'd change it for you, but since you haven't explained your problem, I don't know what to change it to.

Also, please use [code] tags, when you post code. When you do, you preserve your indention, which is important in python.

MODERATOR
Nov 19 '08 #2

P: 2
What do you mean, where's the problem?

You shouldn't just dump code on the experts here without providing at least your output and error messages, if any.

Also, you need a more descriptive title. I'd change it for you, but since you haven't explained your problem, I don't know what to change it to.

Also, please use [code] tags, when you post code. When you do, you preserve your indention, which is important in python.

MODERATOR
Btw you can just delete the thread.
Thanks
Nov 19 '08 #3

Curtis Rutland
Expert 2.5K+
P: 3,256
Are you sure? If you give some more information I'll help you clean it up...or did you solve it yourself?
Nov 19 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.