+ 1

How do I put input in the range "for i in range(5):"

Whatever I do I can't put an input command inside there. Right in between the brackets of range. Please help me. for i in range(5):

11th Sep 2019, 2:03 AM
Shadow
Shadow - avatar
2 Antworten
+ 2
Just add the integer Constructor like below for i in range(int(input("Enter a Number"))): print(i)
11th Sep 2019, 2:13 AM
Qudusayo
Qudusayo - avatar
+ 1
Thanks Qudusayo.
11th Sep 2019, 3:37 AM
Shadow
Shadow - avatar