Answers for "python *range"

0

when do we use *range in python

print([*range(20)]) #will give all numbers 1 to 19 in a list
Posted by: Guest on January-15-2021
3

iteration

#itration 
a,b=4,5
for i in [1,2]:
    print(a,b,i)
    a+=1
    b-=1
#output:
4 5 1
5 4 2
Posted by: Guest on December-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language