MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / string_range

Function string_range

Python/string_range.py:7–11  ·  view source on GitHub ↗
(number)

Source from the content-addressed store, hash-verified

5
6
7def string_range(number):
8 _string = ""
9 for num in range(0, number):
10 _string += str(num)+"." # loop over every element in the range, convert it to a string and concatenate it to the _string variable which is initialized initialy as an empty string
11 return _string[0:len(_string)-1] # to remove the last "." from our return value :)
12
13
14

Callers 1

string_range.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected