Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
37
18
157
14.1K
Sergei Kotov
Sergei Kotov@kotov_dev·
Answer: A) list Python data type basics: › Square brackets [ ] = LIST › Curly braces { } = DICTIONARY or set › Parentheses ( ) = TUPLE L = [1, 23, 'hello', 1] has mixed types (int, str) but it's still a list! For beginners: Python lists can hold ANY data type mixed together!
English
3
1
42
1.2K
Earnest Codes
Earnest Codes@Earnesto037·
@PythonPr Answer: (A) list The object L = [1, 23, 'hello', 1] is a list in Python. Lists are a type of data structure used to store a collection of items. In Python, lists are defined by enclosing the elements within square brackets [], with the elements separated by commas.
English
1
0
5
771
Loïc andréas Ndoko essoke
Loïc andréas Ndoko essoke@LoicNdoko·
@PythonPr # The code from the quiz L = [1, 23, 'hello', 1] # Use the type() function to check the data type of L print(type(L)) <class 'list'> List 📌
English
0
0
1
40
Zerlo
Zerlo@Zerlo_net·
@PythonPr Let me take a look at that code! 🤔
English
0
0
1
50
(⌐▨_▨)
(⌐▨_▨)@kev__arellano·
@PythonPr Everything is an array if you dig deep enough...
English
0
0
1
18
Yash
Yash@buildwithyash·
@PythonPr The above data tyoe is list Option A
English
0
0
1
332
Paylaş