+ 1

How i get output without creat a list?

for i in range(5): Print ("hello") >>>hello hello hello hello hello But i want >>> 1 2 3 4 5

8th Jul 2020, 4:05 AM
W.D.M.M.S.Karunarathna
W.D.M.M.S.Karunarathna - avatar
3 Antworten
8th Jul 2020, 4:11 AM
Atul
Atul - avatar
+ 3
for I in range(5): print(f"{i} ")
8th Jul 2020, 4:07 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 1
for i in range(1,6): print(i) or i=1 while i<6: print(i) i+=1
8th Jul 2020, 4:10 AM
Igor Kostrikin
Igor Kostrikin - avatar