What does rstrip() does?
What does find() does?
What allows duplicate data, ordered and changeable?
mylist = [1,2,3]
What allows duplicate data, ordered and unchangeable?
mytuple = ( “Adam”,”bob”)
What doesn’t allow duplicate data, unordered, unchangeable and unindexed?
myset = { “Dan” , “Chris”}
What doesn’t allow duplicate data, ordered and changeable?
mydict = {
“name” : “Adam” ,
“password” : “123” ,
“role” : “chef”
}
print(mydict[“password”])
What is list used for?
What is list defined by?
How can we create list ? ( 4 )
How can we add element? ( 2 )
Can list insert different types of data ? ( newlist = [ 1 , “Adam” ] )
How to add another list ? ( 2 )
How to print out the list?
How to print the exact list?
How to print the list range?
How to scan through the lists?
new_list = [ 3, 4, 5, 6 ]
for i in new_list:
print(i)
How to search for an element?
new_list = [ 3 , 4 , 5 , 6 ]
for i in new_list:
if ( i == 4 ):
print(f”{ i } found in list”)
new_list = [“John” , “Cat”]
name = str(input(“Enter a name to search for : “))
for i in new_list:
if ( i == name ):
print(f”{ i } found in list”)
What does append do?
What does insert(0,200) do?
What does len(list_name) do?
What does min(list_name) do?
What does max(list_name) do?
What does sum(list_name) do?
What does remove(20) do?