Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def moj_range(*args):
- result = []
- start = 0
- step = 1
- if len(args)==1:
- stop = args[0]
- elif len(args)==2:
- start = args[0]
- stop = args[1]
- elif len(args)==3:
- start = args[0]
- stop = args[1]
- step = args[2]
- else:
- raise TypeError()
- i = start
- while i < stop:
- result.append(i)
- i += step
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement