Can I replace while loop with range function. I am using following code

```
check = 0
while check<5:
      print check
      check+=2

```

I am writing in following way

```
for _check in range(0,5,2):
     print _check

```

is it correct way?

**> Editing My question**

if I am not using \_check variable inside for loop. Can I avoid to declare also