L = [1, 23, 'hello', 1]
-
List
-
Dictionary
-
Tuple
-
Array
Continue Python's thematic quiz, Part 4 goes back to the topic Core Data Type - Standard data types in Python. Let's try with Quantrimang to try the 10 questions below.
L = [1, 23, 'hello', 1]
print "Hello World"[::-1]
list = [ 'Tech', 404, 3.03, 'Beamers', 33.3 ]
print list[1:3]
colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']
orange
indigo
blue
yellow
mylist=[1, 5, 9, int('0')]
print(sum(mylist))
mylist=['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
print(mylist[:-1])
list1 = [1, 3]
list2 = list1
list1[0] = 4
print(list2)
num = '5'*'5'
333
27
9
LoạiError: không thể được phân tách từ không-số của kiểu 'str'
You've just finished reading the article "Multiple choice quiz about Python - Part 4" edited by the TipsMake team. You can save multiple-choice-quiz-about-python-part-4.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.