Computer Science, asked by singhkusum6336, 4 months ago

Question 1:
In Python programming, each item in a list can be referred to using
o datatype
number
O bullets
o index​

Answers

Answered by 16amanmishara
5

Answer:

bullet

Explanation:

iijnhkh jk

Ben is not available

Answered by shekharbhaladhare739
2

Answer:

It is possible to drop the parentheses when specifiying a tuple, and only use a comma seperated list of values:

>>> thing = 2, 4, 6, 8

>>> type(thing)

<class 'tuple'>

>>> thing

(2, 4, 6, 8)

Also, it is required to include a comma when specifying a tuple with only one element:

>>> singleton = (2,)

>>> type(singleton)

<class 'tuple'>

>>> not_tuple = (2)

>>> type(not_tuple)

<class 'int'>

>>> empty_tuple = ()

>>> type(empty_tuple)

<class 'tuple'>

Except for the case of the empty tuple, it is really the commas, not the parentheses, that tell Python it is a tuple.

Similar questions