Question: I was trying different ways of using the `range()` function in Python and when I tried this:

```
print(range(1, 20, 2), end=" ")

```

I got an output like this: `range(1, 20, 2 )` , when I was expecting something like this: `1 3 5 7 9 11 13 15 17 19`  Why is this the case?

Also, are there any other ways to print a range of numbers other than using a loop statement, or is it compulsory to always use loops if I want a sequence of numbers using `range()`?

Answer: 
Detect words first then append them to the list:

```
def n_split(i_str):
    new_list= []
    word=''
    for i in range(len(i_str)):
        if i_str[i]!=' ':
            word += i_str[i]
        else:
            new_list.append(word)
            word =''
    new_list.append(word) #for the last word
    return new_list

inp_str=input("Enter the string:")
print("List:")
print(n_split(inp_str))

```
```
def n_split(i_str):
    split_list= []
    new_list= ''
    for i in range(len(i_str)):
        if i_str[i]!=' ':
            new_list += i_str[i]
        else:
            split_list.append(new_list)
            new_list = ''
    split_list.append(new_list) #appending last word
    return split_list

inp_str=input("Enter the string:")
print("List:")
print(n_split(inp_str))

```

As you are using the range function i will iterate from 0 to len(i\_str). So, no need to initialize i and increment it.

Collect all characters until you find a space and add that string to a new list.