Quantcast
Channel: Bugtreat Blog » List
Viewing all articles
Browse latest Browse all 2

How to create a list in python with length

0
0
In Python, there is no such thing as an array. Instead, we have lists, which are even more flexible. In arrays, you can only have one data type. (String, integer, float, etc.) In lists, you can combine all kinds of data types in one, and you won’t get any errors. Steps create a list in python with length 1.Open an interactive window. Try using IDLE instead of the Python command prompt. To open IDLE, go to Start Menu > All Programs > Python (version number) > IDLE (Python GUI). 2.Next, create your list.  First, write your variable name. This can be pretty much anything, but can not begin with a number. We will use too for the name. Now, type …

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images