I've always wondered how can I work with this. Suppose I want to create a for loop that prints "Hello!" from 0 to 50 for example.

I know I can use a while loop for it, but that's not how I want it to work.

Say k = 0, total = 50. I want a for loop that looks like this.

for k in total:
     print k

I made some progress, I'm using the range function built in pyton.

All good now :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.