user721121 user721121 - 3 years ago 96
Python Question

Python raw input with loop of counting

I'd like to output the

looping including the numbers which have been given.

amount = int(raw_input("Enter number? "))
for item in range(amount):
input = raw_input("#"), amount

Actual output:

Enter number? 2


Enter number? 2

Is this possible?

Wauw, i'm getting a lot of responses very quickly. Thank you all for your effort.

Answer Source

This should produce the result you show as your goal...

amount = int(raw_input('Enter number? '))
for item in range(1, amount + 1):
    print('#' + str(item))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download