Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Python: Get list of numbers using range function

We can convert the output of range() Function to a list using ‘list()’ function.

 

Example

list(range(1, 10))

>>> list1 = list(range(1, 10))
>>>
>>> list1
[1, 2, 3, 4, 5, 6, 7, 8, 9]

 

 

 

Previous                                                    Next                                                    Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Python: Get list of numbers using range function

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×