Computer Science, asked by chai95452, 7 hours ago

What data type is the object below ? L = [1, 23, ‘hello’, 1]​

Answers

Answered by Lazr
7

Answer:

A list

Explanation:

The syntax [] means a list, and the objects inside it are seperated by commas. In this case, the object is a list with the four objects inside it which are 1, 23, 'hello', and 1.

Note: This is only for python. This syntax may be different for other languages

Answered by BrainlyYoda
2

List is the data type of the object L = [1, 23, ‘hello’, 1]​

Explanation

L is a list that has multiple items stored in it such as 1, 23, hello and 1

Extra Information

A list contains python objects and objects inside are separated by comma (,) and enclosed within square brackets.

List can contain values of the types Integers, Floats, Lists, and Tuples.

Integer Values such as the whole numbers can be positive, negative and zero. Example => 5, 6, 7, -8, 0 etc.

Float values are those values that consist of decimal numbers. Example => 5.25, 9.187 etc.

A tuple is almost like a List and contains python objects and objects inside are separated by comma (,) and enclosed within parentheses.

More Examples of List

1. list1 = [6.25, 'brinjal', 'onion', 'beans']

2. list2 = [5, 6, -8, 0]

3. list3 = [5.36, 8.25, -9.26, 6]

4. list4 = [6.25, 'brinjal', 'onion', [5.36, 8.25, -9.26, 6]]

5. list5 = [6.25, 'brinjal', 'onion', (5, 6, -8, 0)]

Python is created by Guido van Rossum and came into existence in 1991. It is a high-level and general programming language. It is a very lucid programming language as it has a good language construct and object-oriented approach. It is dynamically typed and garbage-collected.

Similar questions