Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16862

How to repeat but take different inputs each time?

$
0
0
num = int(input())for a in range(num):    a=input()

So I want to repeat for how many times num is, but how do you make "a" a different variable? I mean so that there would be many variables a,b,c,d,e... that are all different user inputs.

Apparently

num = int(input())a = input()b = input()c = input()...

Would be too long, and would not match num. So how do I do it?


Viewing all articles
Browse latest Browse all 16862

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>